Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-07-21 23:50:29

johnnie
Member
Registered: 2007-03-10
Posts: 58

Hide stickies on '< older' and 'newer >' pages.

The following is the situation:

On my frontpage, I have one sticky post on top which introduces the user to the website. I want this post to be always on top (hence I made it ‘sticky’), but I want it to go away when the user clicks ‘older’ or ‘newer’! I now have two separate tags: one displaying the sticky, the other displaying the 5 most recent live articles. How do I make sure the sticky vanishes when I ‘paginate’ away? Is there a conditional for this?

Offline

#2 2007-07-22 07:00:29

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: Hide stickies on '< older' and 'newer >' pages.

glx_if

<txp:glx_if_frontpage>your sticky article here</txp:glx_if_frontpage><txp article limit=5 />

Last edited by colak (2007-07-22 07:00:53)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2007-07-22 08:02:42

johnnie
Member
Registered: 2007-03-10
Posts: 58

Re: Hide stickies on '< older' and 'newer >' pages.

Thanks, brilliant. I was hoping I could fix it without needing a plug-in, but I guess this is the most elegant way to do it, since it saves me an additional <txp:if_search><txp:else/> construction :)

Last edited by johnnie (2007-07-22 08:03:46)

Offline

Board footer

Powered by FluxBB