Logic tags handle basic logic, including creating data objects and collections, setting shared variables, evaluating expressions, and looping over a data collection.
For a full list of tags and attributes, see the tagdocs. Tagdocs for all platforms are available on the API Libraries page.
Tag | Function | More Information |
---|---|---|
pt:logic.data | Creates a data object (collection of name=value pairs) and stores it in a shared variable using the key supplied. | Using Shared Variables in Adaptive Tags |
pt:logic.concat | Concatenates two values into one and sets the new value in a variable with a specified name. | Using Shared Variables in Adaptive Tags |
pt:logic.variable | Stores a shared variable using the key and value supplied. Designed for use with attribute replacement or with the pt:logic.value tag. | Using Shared Variables in Adaptive Tags |
pt:logic.collection | Creates a collection of data objects and stores it in a shared variable using the key supplied. | Using Shared Variables in Adaptive Tags |
pt:logic.collectionlength | Evaluates the length of a collection and stores the result in memory. | Using Shared Variables in Adaptive Tags |
pt:logic.value | Evaluates an attribute and displays the referenced value. Used as singleton only (does not display the contents of the tag). | Using Shared Variables in Adaptive Tags |
pt:logic.boolexpr | Evaluates a boolean expression and stores the result as a boolean in memory. Designed to work with the pt:logic.if tag. | Evaluating Expressions Using Adaptive Tags |
pt:logic.intexpr | Evaluates an integer expression and stores the result as a boolean in memory. Designed to work with the pt:logic.if tag. | Evaluating Expressions Using Adaptive Tags |
pt:logic.stringexpr | Evaluates whether or not two strings are equal and stores the result as a boolean in memory. The case must match. Designed to work with the pt:logic.if tag. | Evaluating Expressions Using Adaptive Tags |
pt:logic.containsexpr | Checks if a collection contains a specific data element and sets a specified variable to true or false. Designed to work with the pt:logic.if tag. | Evaluating Expressions Using Adaptive Tags |
pt:logic.if | Evaluates an expression and displays either the pt:logic.iftrue or pt:logic.iffalse tag contents. | Evaluating Expressions Using Adaptive Tags |
pt:logic:iffalse | Displayed if the surrounding pt:logic.if tag evaluates to false. | Evaluating Expressions Using Adaptive Tags |
pt:logic:iftrue | Displayed if the surrounding pt:logic.if tag evaluates to true. | Evaluating Expressions Using Adaptive Tags |
pt:logic.foreach | Allows looping over a data collection. Supports tag and portlet request scope only. | Looping Over Data Collections Using Adaptive Tags |
pt:logic.separator | Inserts a separator between the elements of a foreach loop. | Looping Over Data Collections Using Adaptive Tags |