Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-11 23:38:16

mhulse
Plugin Author
From: Eugene Oregon
Registered: 2005-01-21
Posts: 200

[solved] txp:newer & txp:older -- condtional hiding?

Hi,

Is it possible to show the older and newer links only if there are older/newer articles?

For example:

I am paginating by 3 articles.
I have 4 articles total.
This creates two pages.
If on page one, I want to hide the “prev” link.
If on page two, I want to hide the “next” link.

I have searched around, but maybe I am not looking for the right keywords.

TIA!
Cheers,
Micky

Last edited by mhulse (2007-08-12 08:13:41)

Offline

#2 2007-08-12 07:42:54

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [solved] txp:newer & txp:older -- condtional hiding?

If I’m correct Textpattern 4.0.5. does it automatically (mine TXPs do).

<txp:older><txp:text item="older" /></txp:older>
<txp:newer><txp:text item="newer" /></txp:newer>

Last edited by Gocom (2007-08-12 07:44:44)

Offline

#3 2007-08-12 08:12:30

mhulse
Plugin Author
From: Eugene Oregon
Registered: 2005-01-21
Posts: 200

Re: [solved] txp:newer & txp:older -- condtional hiding?

Ahhhhh, thanks Gocom! You rock!

I was using the OLDER and NEWER tags as self-closing within the HREF of a couple of A tags… But once I changed it to your code (tag pairs), everything works perfectly. :D

Thanks a billion!
Have a great day/night.
Cheers,
Micky

Last edited by mhulse (2007-08-12 08:13:15)

Offline

Board footer

Powered by FluxBB