Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Sticky Article apearring only on first page
Question with what could be an obvious solution (or near impossible)…
I want to include sticky posts in my page template and have them display ONLY at the top of the first page of the listings they belong to.. so:
- On the home page, but not ?pg=2
- On the first page of any category listings they belong to, but not the second or later pages
- Not on the search page unless they’re part of the results
Right now I’m using a construct similar to the following, but I wind up with the sticky post on the top of every listing page – the first one or the 30th:
<code>
<txp:if_search>
<txp:article searchsticky=“1” limit=“10” />
<txp:else />
<txp:article status=“sticky” />
<txp:article searchsticky=“1” limit=“3” />
</txp:if_search>
</code>
Is there some tag I’m missing thats part of core to check if pg=1 / no page given? Is there a plugin that would do this if I had to go in that direction?
In basic terms, I’d want the behavior to mimic the threads in this forum…
Site: placenamehere.com
Microformat Plugin: pnh_mf
Offline
Re: Sticky Article apearring only on first page
Hi placenamehere
Maybe the chs_ifurlvar plug-in can do the trick.
Offline
Re: Sticky Article apearring only on first page
Thanks. Looks like it might do what I want with a bit of tweaking (can’t tell from the listing if it supprts else, if not it could get repetitive.
Anyone have any thoughts? I’d like to see how close to this behavior I can get without relying on plugins — if its any coser then what i’ve already done.
Site: placenamehere.com
Microformat Plugin: pnh_mf
Offline