#LIST
Processes and outputs cScript between #LIST() and #ENDLIST for each item in a Publication List or collection.
Syntax
#LIST(List[, ...]) ... #ENDLIST
Parameters
- List - A Publication List Identifier or collection variable:
- Identifier of Publication List - Process a Publication List in the current cScript context and iterate through the results.
- Collection Variable - A variable containing a collection of objects, such as a field that contains a list, or a variable set with #CQL, #CPATH or #SQL.
- Inline Query - A cPath or cQL query can be specified inside ${}.
- ... - Optional parameters to pass to the Publication List, which will be available in the Publication List Filter and Order/Limit as $A, $B and so on.
Publication List Example
#/ List events from a Publication List with the Identifier "Events"
#LIST(Events)
$Date - $Description
#ENDLIST
List Field Example
#/ List events in a Venue's Events list field
#CONTEXT($Venue,OID=123)
#LIST($Events)
$Date - $Description
#ENDLIST
#ENDCONTEXT
Query Example
#/ List events in a Venue's Events list field
#CQL($Events,"FROM Event WHERE @(Events)Venue.OID=123")
#LIST($Events)
$Date - $Description
#ENDLIST
Inline cPath Query Example
#/ List events in a Venue's Events list field
#LIST(${[:Venue AND OID=123].Events})
$Date - $Description
#ENDLIST
Inline cQL Query Example
#/ List events in a Venue's Events list field
#LIST(${FROM Event WHERE @(Events)Venue.OID=123})
$Date - $Description
#ENDLIST