| |||||||
FRAMES NO FRAMES |
<pt:ptdata.mycommunitiesdata pt:id="comms"/>
<pt:logic.foreach pt:data="comms" pt:var="curr">
<pt:logic.containsexpr pt:expr="($curr) contains currpage" 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>
</pt:logic.foreach>
or ...
<pt:logic.data pt:key="data" name="abc"/>
<pt:logic.containsexpr pt:expr="($data) contains name" 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 Name | containsexpr |
Attributes | ||||
Name | Type | Required | Default Value | Description |
key | string | true | null | The key used to store the result in memory. |
scope | string | false | portlet request | The scope used to store the result in memory. See the Logic tag library description for details about valid scope arguments. |
expr | string | true | null | A string expression that requires three components separated by a space: 1. A variable reference for a data object in parentheses (entry in a pt:data list, or a variable created from the logic.data tag) 2. The word "contains" 3. The key of an element in the data to check for. Example: expr="($mydata) contains myelement" |
| |||||||
FRAMES NO FRAMES |