Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-02-10 18:49:12

placenamehere
Archived Plugin Author
Registered: 2004-11-21
Posts: 88
Website

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

#2 2006-02-10 19:22:40

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Sticky Article apearring only on first page

Hi placenamehere

Maybe the chs_ifurlvar plug-in can do the trick.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2006-02-10 20:23:31

placenamehere
Archived Plugin Author
Registered: 2004-11-21
Posts: 88
Website

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

Board footer

Powered by FluxBB