Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-12-07 03:23:27

minimal design
Member
Registered: 2006-10-15
Posts: 38

negative conditional

Is there a standard Txp way to write negative conditionals? I’m talking about a “If not” tag if you will… Looked at the tag definition list and tag alphabetical list but didn’t see anything there…

For example, if I want “if not an individual article” you can write it like this:

<txp:if_individual_article><txp:else />My actual code here</txp:if_individual_article>

But I’m wondering if there’s a cleaner way to do it…

Thanks!

Offline

#2 2006-12-07 04:00:49

Elenita
Member
From: Falls Church, VA
Registered: 2004-05-16
Posts: 407
Website

Re: negative conditional

Since this is the method suggested in the FAQ, I’m thinking not.

Last edited by Elenita (2006-12-07 04:01:57)

Offline

#3 2006-12-07 05:01:30

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: negative conditional

if_article_list is shorter, just the reverse.

Offline

#4 2006-12-07 13:07:19

minimal design
Member
Registered: 2006-10-15
Posts: 38

Re: negative conditional

I searched the forum but neglected to search the FAQ because I read it a while back but didn’t remember it mentioned something about that. Thanks for the pointer! :)

Offline

Board footer

Powered by FluxBB