Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-08-20 14:25:28
- glenelkins
- Member
- Registered: 2008-08-28
- Posts: 29
<txp:older /> and <txp:newer />
Hi
Why is the <txp:newer> and <txp:older> not showing the links?
[code]
<txp:article_custom allowoverride=“1” form=“news-listing” limit=“5” pgonly=“0” section=“latest-news” sort=“Posted desc” status=“4” />
<p><txp:newer>« Newer articles|</txp:newer><txp:older>Previous articles »</txp:older></p>
[/code]
I have also just tested a url like : http://testdomain.com/articles/?pg=2 and all its doing is showing the same articles as the first page!
Last edited by glenelkins (2009-08-20 14:59:33)
Offline
Re: <txp:older /> and <txp:newer />
glenelkins wrote:
Why is the <txp:newer> and <txp:older> not showing the links?
Probably because older/newer don’t work with <txp:article_custom />. From that page:
… while the article tag can only see posts within the currently viewed section/category/author and so forth, article_custom can see all posts from all sections, categories and authors unless you restrict it via attributes (see below), thus context-sensitive navigation tags, such as older and newer, will not work
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#3 2009-08-21 08:29:04
- glenelkins
- Member
- Registered: 2008-08-28
- Posts: 29
Re: <txp:older /> and <txp:newer />
hi
<txp:article sort=“Posted desc” limit=“2” form=“news-listing” />
this is not working! I have setup 1 test article in the section “news-test” and the code above is in the default page code used for the section “news-test” I dont understand why its not picking the article up
Offline
Re: <txp:older /> and <txp:newer />
Hi glenelkins,
Can you post a tag trace?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#5 2009-08-21 10:03:56
- glenelkins
- Member
- Registered: 2008-08-28
- Posts: 29
Re: <txp:older /> and <txp:newer />
its ok i worked that out
the older and newer links show on the article list fine now! but how do you get them to show on an individual article?
Offline
Re: <txp:older /> and <txp:newer />
For the individual article you need the link_to_next and link_to_prev tags.
Offline
Re: <txp:older /> and <txp:newer />
In the form somewhere you can have something like
<txp:if_article_list>
<txp:older /> | <txp:newer /> <txp:hide> This is when you are in an article list </txp:hide>
<txp:else />
<txp:link_to_next /> |<txp:link_to_prev /> <txp:hide> This is when you are in an individual article </txp:hide>
<txp:if_article_list>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Pages: 1