Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-08 20:54:35

anoke
Archived Plugin Author
Registered: 2006-04-15
Posts: 152

nested if_article_categories?

“how do I understand the way Textpattern parses conditionals?” (i think it has a lot to do with passes when textpattern parses the page templates and forms)

<txp:if_article_category number="1"> cat1 set </txp:if_article_category>

and

<txp:if_article_category number="2"> cat2 set </txp:if_article_category>

..right?

why then

<txp:if_article_category number="1"><txp:if_article_category number="2"> both set! </txp:if_article_category></txp:if_article_category>

fails?

I want to output text only if both categories are met.

Though this works (woot, i have almost complete txp-only breadcrumbs) :

<txp:if_article_category number="1"><txp:output_form form="check_cat2" /></txp:if_article_category>

misc. form check_cat2 being

<txp:if_article_category number="2">both set!</txp:if_article_category>


- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -

Offline

#2 2006-05-08 21:45:46

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: nested if_article_categories?

http://textpattern.com/faq/39/problems-with-nested-txpif_-tags

-Kurt


kurt@kurtraschke.com

Offline

#3 2006-05-08 21:55:21

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: nested if_article_categories?

Though this works …

Hey, that’s good to know, thanks! It is not possible to nest a conditional inside an identical one, but I know it is possible to use php instead of the nested tag. I suppose your example comes down to the same principle and therefore works.

Offline

#4 2006-05-09 05:20:22

anoke
Archived Plugin Author
Registered: 2006-04-15
Posts: 152

Re: nested if_article_categories?

Kurt,

thanks. I googled everything else but simple “nested tags problems” – even did the site: -search :D
*sigh*


- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -

Offline

Board footer

Powered by FluxBB