Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-03-05 18:40:01

maratnugmanov
Member
From: Russia / Kazakhstan
Registered: 2013-02-24
Posts: 54
Website

If / then / else problem

I have one form for individual articles and for list of them. But portfolio has a separate form, but only for article list. Can anyone come with idea how should I specify conditions?

Problem solved. But maybe has some answers to the next question:
  • Maybe there is an OR condition that I couldn’t find.

Last edited by maratnugmanov (2013-03-05 18:45:59)

Offline

#2 2013-03-05 18:47:11

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

Re: If / then / else problem

Number of attributes take comma-separated list of values. This includes tags such as article_custom, if_section and if_article_section.

Conditional tags also allow the use of else statement. This combined with the multi-value support, you can exclude multiple values:

<txp:if_foobar values="default, portfolio">
	Foobar equals 'default' or 'portfolio'.
<txp:else />
	Foobar is something else.
</txp:if_foobar>

Offline

#3 2013-03-05 19:24:05

gour
Member
From: Hlapičina, Croatia
Registered: 2013-01-17
Posts: 124

Re: If / then / else problem

Gocom wrote:

Conditional tags also allow the use of else statement. This combined with the multi-value support, you can exclude multiple values:

Hey, this looks as just what we need :-)

Offline

Board footer

Powered by FluxBB