Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
<txp:older><txp:newer> stopped working
I’m not sure if this has happened with the release of 4.0.3, but I think it might be.
Unless I’ve missed something, the tags <txp:older> and <txp:newer> are not working for me in a new install.
Here’s the context that they are placed in:
<code>
<txp:if_section name=“blog”>
<txp:article form=“default” listform=“list_blog” sortby=“posted”
sortdir=“desc” limit=“6” />
<txp:if_article_list>
<hr />
<p>
<txp:older>Previous Posts </txp:older>
<txp:newer>Newer Posts</txp:newer>
</p>
</txp:if_article_list>
</code>
But the ‘older’ and ‘newer’ tags are simply not producing any output.
The page concerned is here: http://ministrygrounds.net/blog
Any helpful pointers gratefully received!
Cheers
Offline
Re: <txp:older><txp:newer> stopped working
Odd, I cannot reproduce the problem here.
Have you tried disabling all plugins for a test-run in case any of them may have lasting side-effects on variables used by txp?
Offline
Re: <txp:older><txp:newer> stopped working
Have you closed the “if_section” tag Neil? It might be further down your template but I thought I would mention it. :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: <txp:older><txp:newer> stopped working
> Sencer wrote:
> Odd, I cannot reproduce the problem here.
> Have you tried disabling all plugins for a test-run in case any of them may have lasting side-effects on variables used by txp?
Haven’t yet Sencer, but will. Being a new install, I only have 4-5 plugins installed.
Will report back…
Thanks.
Offline
Re: <txp:older><txp:newer> stopped working
> thebombsite wrote:
> Have you closed the “if_section” tag Neil? It might be further down your template but I thought I would mention it. :)
Hi Stu,
Yep, have done – it’s the next line after my quoted code (menat to quote it too).
Thanks.
Offline
Re: <txp:older><txp:newer> stopped working
Just another silly little thing which I admit I fall for myself – as it’s a new install you do have more than 6 articles don’t you?? :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: <txp:older><txp:newer> stopped working
I thought of that too Stu ;-) But yes, I do, as I have copied across posts from a previous site…
Cheers
Offline
#8 2006-01-02 09:06:43
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: <txp:older><txp:newer> stopped working
Reduce the limit and see what happens. If it’s the same, try removing the if_article_list conditional.
Alex
Offline
Re: <txp:older><txp:newer> stopped working
Thanks Alex.
Just tried both – no change (which puzzles me somewhat, as I thought I had a good reason for having the <txp:if_section> tags in there!)
Cheers
.
Offline
#10 2006-01-03 18:44:16
- SamuelJohn
- New Member
- Registered: 2005-06-01
- Posts: 8
Re: <txp:older><txp:newer> stopped working
Hi,
I got the same problem, I think. On my txp there the pagination works at first, but on page 2 an/or 3 (sems abit random…) txp:newer and txp:older do not produce any output. When I manually enter the url with ?pg=3 at the end, then the page is shown and there is a link to page4, for example.
Well, in version 4.0.2 there my navigation was broken completely, but in 4.0.3 only on some pages the pagination is broken.
Navigation for individual articles is working fine.
Any hints ?
my code:
< txp:article form=“Single” listform=“default” limit=“3” />
<txp:newer>newer</txp:newer><txp:older> | older</txp:older>
Offline
Re: <txp:older><txp:newer> stopped working
To fix it or make suggestions we need to be able to reproduce it. If any of you would be so kind as to make a clean-install and track and describe exactly the steps necessary to reproduce the problem, that would be very helpful.
Offline
Re: <txp:older><txp:newer> stopped working
> Sencer wrote:
> To fix it or make suggestions we need to be able to reproduce it. If any of you would be so kind as to make a clean-install
> and track and describe exactly the steps necessary to reproduce the problem, that would be very helpful.
Hi Sencer,
OK, I built a completely clean, bog-standard install – and the <older> a <newer> tags work perfectly when the new db is populated with enough rubbish posts to use the pagination tags.
For comparison, here is the code from the new install (which I’m sure you’re familiar with!). The limit=“2” was only added to generate the older and newer links.
<code>
<txp:article limit=“2” />
<txp:if_individual_article>
<p>
<txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
<txp:link_to_next><txp:next_title /></txp:link_to_next>
</p>
</txp:if_individual_article>
<txp:if_article_list>
<p>
<txp:older>Previous</txp:older>
<txp:newer>Next</txp:newer>
</p>
</txp:if_article_list>
</code>
<br /> Here’s a slightly cleaned up version of the code on my site which isn’t working:
<code>
<txp:article listform=“list_blog” limit=“6” />
<txp:if_individual_article>
<br /><hr />
<txp:link_to_prev><txp:prev_title /></txp:link_to_prev> |
<txp:link_to_next><txp:next_title /></txp:link_to_next><br /><br />
Return to <a href=”<txp:site_url />Blog”>Blog</a> list of articles
<br /><br />
</txp:if_individual_article>
<txp:if_article_list>
<hr />
<p>
<txp:older>Previous Posts </txp:older>
<txp:newer>Newer Posts</txp:newer>
</p>
</txp:if_article_list>
</code>
<br />The only difference I can see is that I use a customised list form, which consists of this:
<code>
<img src=“images/tinybean.jpg”><h3><txp:permlink><txp:title /></txp:permlink></h3>
<p class=“smallmeta”>Posted: <txp:posted />| <txp:comments_invite /> | Filed Under: <a href=”<txp:site_url /><txp:section />/?c=<txp:category1 />”><txp:category1 /></a> | <a href=”<txp:site_url /><txp:section />/?c=<txp:category2 />”><txp:category2 /></a></p><br />
<txp:excerpt />
</code>
I’m very happy to be told I’m doing something really silly!
Many thanks for your help.
Offline