Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-16 01:37:59

harryv
Member
From: denmark
Registered: 2005-03-26
Posts: 11
Website

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

#3 2005-11-16 04:34:50

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

Board footer

Powered by FluxBB