Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-06-11 23:15:35

Vinster
New Member
From: Montreal, Québec, Canada
Registered: 2011-06-09
Posts: 7

<txp:if_NOT_last_article>

My current situation is that I’m adding a line at the end of each of my articles during the listing. I’ve noticed there’s a <txp:if_last_article> tag that would allow be specific things only for the last, but my problem is the opposite. I wanna had the line at the end of my articles only if it’s not the last.

I’ve found the documentation page on the <txp:if_last_article> tag, but there’s no mention of a if not last.
http://textpattern.net/wiki/index.php?title=if_last_article

Is there another tag to negate the condition ?

Thanks for your help!


Hope for the best, but prepare for the worst!

Offline

#2 2011-06-11 23:22:26

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: <txp:if_NOT_last_article>

Vinster wrote:

Is there another tag to negate the condition ?

Every conditional tag has an else statement. For example:

<txp:if_last_article>
	<!--
		This is the last article.
	-->
<txp:else />
	<!--
		This is everything else than not the last article.
	-->
</txp:if_last_article>

Offline

#3 2011-06-11 23:49:46

Vinster
New Member
From: Montreal, Québec, Canada
Registered: 2011-06-09
Posts: 7

Re: <txp:if_NOT_last_article>

Oh damn. I really should of thought of that one.

Thank you very much!

Last edited by Vinster (2011-06-11 23:50:23)


Hope for the best, but prepare for the worst!

Offline

Board footer

Powered by FluxBB