Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-02-11 19:33:53

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Default conditional + two special-case conditionals

I want to use the if_article_category conditional to get special case behaviours for two specific categories and default behaviours for the rest of the categories on an article form.

It doesn’t look like if_article_category supports multiple categories. Here’s how I’ve tried it (without success).

<code><txp:if_article_category name=“One” >
I am One
</txp:if_article_category>
<txp:if_article_category name=“Two” >
I am Two
</txp:if_article_category>
<txp:if_article_category name=“Three,Four,Five,Six,Seven” >
I am the default value
</txp:if_article_category>
</code>

Any help would be appreciated.
-Thanks

Last edited by mrdale (2006-02-11 19:34:17)

Offline

#2 2006-02-11 19:54:16

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

Re: Default conditional + two special-case conditionals

Hmmm.

It looks like <code><txp:if_article_category name=“Three,Four,Five,Six,Seven” ></code> could be replaced by <code><txp:else /></code> but I’m unsure how to put in that second conditional.

Sorry I couldn’t be of more help. Hopefully, someone can come up with a solution.

Offline

#3 2006-02-11 20:30:41

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Default conditional + two special-case conditionals

Hi mrdale.

As far as I know, in 4.0.2, if_article_category and if_article_section didnt support multiple values.

Check this thread: http://forum.textpattern.com/viewtopic.php?id=12763

I dont know if that has changed in 4.0.3.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB