Logic Tags
Tag stringexpr

This tag evaluates whether or not two strings are equal and stores the result as a boolean in memory. Case must match. It is designed to work with the logic.if tag.

<pt:logic.variable pt:key="title" pt:value="Administrator"/>
<pt:logic.stringexpr pt:expr="($title) == Administrator" pt:key="boolvalue"/>
<pt:logic.if pt:expr="$boolvalue">
  This is displayed if expr evaluates to true.
   This is displayed if expr evaluates to false.

Tag Information
Tag Namestringexpr

NameTypeRequiredDefault ValueDescription
exprstringtruenullA tag variable, followed by a space and a string comparator, and then another space and a string value or another tag variable. The tag variable must be in $ attribute notation surrounded by parentheses. The following operators are allowed: '==' and '!='.
keystringtruenullThe key used to store the result in memory.
scopestringfalseportlet requestThe scope used to store the result in memory. See the Logic tag library description for details about valid scope arguments.

Copyright 2005 Plumtree Software, Inc.