Logic Tags
Tag if


This tag evaluates an expression and then displays either the logic.iftrue or logic.iffalse tag contents.

Example:
<pt:logic.collectionlength pt:data="testcollection" pt:key="length"/>
<pt:logic.intexpr pt:expr="($length) > 1" pt:key="boolvalue"/>
<pt:logic.if pt:expr="$boolvalue">
 <pt:logic.iftrue>
  This is displayed if expr evaluates to true.
 </pt:logic.iftrue>
 <pt:logic.iffalse>
   This is displayed if expr evaluates to false.
 </pt:logic.iffalse>
</pt:logic.if>


Tag Information
Tag Nameif
Related Child Tag(s)iftrue iffalse

Attributes
NameTypeRequiredDefault ValueDescription
exprbooleantruenullA boolean value (i.e. true or false). This can be input as an tag variable using the $ attribute notation (i.e. pt:expr="$myboolean").


Copyright 2005 Plumtree Software, Inc.