Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
if_last_article(_in_category) ?
Hello!
I do have the following in my article form:
<code>
<txp:if_different>
<div class=“wishlist”>
<h1><txp:category1 title=1 /></h1>
</txp:if_different>
<txp:permlink><txp:title /></txp:permlink>
<txp:if_last_article>
</div>
</txp:if_last_article>
</code>
But, if_last_article applies only to the very last article. I need it to apply to the last article of each category, so every category is in its own DIV. How can i do that?
Last edited by harryv (2005-11-16 01:39:01)
Offline
#2 2005-11-16 02:59:50
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: if_last_article(_in_category) ?
Multiple instances of your Txp:article tag could (it is a bit clunky) be used to do that; you wouldn’t need the if_different tags that way. One article tag for each category and a pageby attribute value to maintain list navigation. Apply your divs to the article tag itself.
<code><div class=“wishlist”><txp:article category=“firstcategory” pageby=“n” /></div></code>
“n” being the sum total of articles you want to page by with all your tags.
Offline
Re: if_last_article(_in_category) ?
Would it be possible to see the code for the page template you are calling this to?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Pages: 1