Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Pagination Help
When i’m on a page of articles that is NOT the first page (ie ?pg=2), I would like to show a link to the main page.
So, if I’m on the home page, i don’t see the link to the home page, but if I’m on page 2 or 3 of articles, i want the link to show up.
i’m sure i’m missing something silly that can be done conditionally. ideas?
Offline
Re: Pagination Help
I’ve found wet_if_page to be extremely handy in those situations. ;-) It’s very old plugin, but works. Something like this could do the job:
<txp:wet_if_page page="1"><txp:else />Not in front page.</txp:wet_if_page>
Offline
Re: Pagination Help
thanks. that will do it!
Offline
Re: Pagination Help
Hi,
A Txp native solution could be:
<txp:variable name="previous_page" value='<txp:newer />' />
<txp:if_variable name="previous_page" value="">
There isn't any page before; don't do anything!
<txp:else />
There is a page before the current page; display the pagination link!
</txp:if_variable>
Last edited by NicolasGraph (2014-08-12 15:11:56)
Offline
Pages: 1