Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: link_to_next not working
You’re still using TXP 4.5.5. Please upgrade to version 4.5.7. Not because of what you asked here, but for other reasons.
Offline
#14 2015-05-22 16:54:13
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: link_to_next not working
laaaars wrote #291005:
Could you please explain in short why article instead of article_custom creates the trouble?
Furthermore, <txp:article />
(documentation) doesn’t work with the id attribute.
Offline
Re: link_to_next not working
Hi,
It’s the kind of day when simple things go wrong…
I use this topic because I can’t make my <txp:link_to_prev />
and/or <txp:link_to_next />
tags work on individual article pages…
Here is the minimal page I’m using to try to understand.
<txp:article break="br" >
<txp:link_to_prev><txp:prev_title /></txp:link_to_prev><br />
<txp:link_to_next><txp:next_title /></txp:link_to_next><br />
</txp:article>
I read old related threads but I can’t understand what’s wrong with these few code lines; it is so simple…
Last edited by NicolasGraph (2015-09-20 11:22:56)
Offline
Re: link_to_next not working
Hi Nicolas, how are you using the tags? You shouldn’t need to wrap the link_to_next
and link_to_prev
in an article
tag.
Have you tried the basic version from the docs?
<txp:link_to_next><txp:next_title /></txp:link_to_next>
<txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
Offline
Re: link_to_next not working
jstubbs wrote #295008:
Hi Nicolas, how are you using the tags? You shouldn’t need to wrap the
link_to_next
andlink_to_prev
in anarticle
tag.Have you tried the basic version from the docs?
<txp:link_to_next><txp:next_title /></txp:link_to_next>...
I usually use these tags in my article form, that’s why I nested them in a <txp:article>
tag in my page exemple.
Edit: even if I take the@<txp:article>@ tag off, nothing is displayed on individual article pages.
Last edited by NicolasGraph (2015-09-20 11:15:44)
Offline
Re: link_to_next not working
So your code is in a page template? Assuming you use an if_individual_article
tag you could use something like:
<txp:if_individual_article>
<txp:article limit="1">
<h2><txp:title /></h2>
<txp:body />
<div class="article_nav">
<txp:link_to_next><txp:next_title /></txp:link_to_next><br /><txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
</div>
</txp:article>
</txp:if_individual_article>
Offline
Re: link_to_next not working
I assume you have a next/prev title otherwise nothing will show with that code..
Offline
Offline
Offline
Offline
Re: link_to_next not working
jstubbs wrote #295010:
So your code is in a page template? Assuming you use an
if_individual_article
tag you could use something like:
<txp:if_individual_article>...
Oh, ok Jonathan, I didn’t see this post, sorry. I gave it a try even before to post on the forum but the limit
attribute doesn’t change anything.
Edit: I was working with Mamp. I’m trying to put everything on line to see if the problem persist, I’ll tell you.
Last edited by NicolasGraph (2015-09-20 11:41:23)
Offline
Re: link_to_next not working
That’s weird. So must be something else then if there is a next/prev title. Have you checked the sections and so on? Or used a tag trace?
Offline