Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#136 2008-04-23 18:04:02
Re: Widescreen, a photoblog template
Let’s see if I can explain this without confusing you (too much). The default section (your frontpage) is always an article list. Even if you only allow one article to show it is still an article list of one.
When you select an article from your archive you are now viewing an individual article.
Keeping the above in mind, for article list views you need to use the <txp:newer> and <txp:older> tags but for individual article views you need to use the <txp:link_to_next> and <txp:link_to_previous> tags.
I believe you are using a single form template for your top navigation so what you need to do is surround those links with a conditional like so:-
<txp:if_individual_article>
<txp:link_to_next>Next</txp:link_to_next>
<txp:link_to_previous>Previous</txp:link_to_previous>
<txp:else />
<txp:newer>Next</txp:newer>
<txp:older>Previous</txp:older>
</txp:if_individual_article>
or something similar to that to get the exact effect that you need.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#137 2008-04-23 18:59:23
Re: Widescreen, a photoblog template
Should be <txp:link_to_prev>Previous</txp:link_to_prev> though.
Here is the relevent portion of the header-nav form
<li id="n-previous">
<txp:if_individual_article>
<txp:link_to_prev>Previous</txp:link_to_prev>
<txp:else />
<txp:older>Previous</txp:older>
</txp:if_individual_article>
</li>
<li id="n-next">
<txp:if_individual_article>
<txp:link_to_next>Next</txp:link_to_next>
<txp:else />
<txp:newer>Next</txp:newer>
</txp:if_individual_article>
</li>
Last edited by MattD (2009-07-28 17:39:30)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#138 2008-04-23 19:18:58
- mbravo
- New Member
- Registered: 2005-08-11
- Posts: 8
Re: Widescreen, a photoblog template
Thanks a lot! Thebombsite gave the perfect explanation and Matt then quoted the relevant portion of code so I didn’t even have to type anything :)
And everything now works as intended, plus I learned a few things about Textpattern.
Offline
#139 2008-08-19 12:00:34
- infrarosso
- New Member
- Registered: 2007-10-15
- Posts: 6
Re: Widescreen, a photoblog template
hi all! First of all thx for the great template. Then i have made an italian version of this and i’d like to share. Can anybody tell me how to do? i’m a bit noooob! ;)
Giovanni
Offline