txp:else

The else tag is a Single Tag. The else tag is used between conditional tags to provide the means to assign default, or alternative behavior, when the condition set in the conditional tag is not met.

Syntax

The else tag has the following syntactic structure…

<txp:if_conditional_tag>
...Content if true...
  <txp:else />
...Content if not true...
</txp:if_conditional_tag>

Attributes

There are no attributes associated with else.

Examples

Display excerpt when available, otherwise display section name

<txp:if_excerpt>
	And Furthermore &amp;#183; <txp:excerpt />
<txp:else />
	<txp:section link="1" /> 
</txp:if_excerpt>

Other tags used: <excerpt />, <if_excerpt>, <section />

txp/else.txt · Last modified: 2008/02/05 14:36 by hcgtv

Home Page | User Forums | Driven by DokuWiki
Copyright © 2008 xPattern