{{ select }}

select Properties

Represents the selection from a select list. The select list may or may not allow multiple selections (defaults to only allow a single selection).

Field Type Description
object_type string Will always be "select".
is_valid True|False True if one of the defined options is selected. To make a (none) option, define an option with an empty value.
value string Delimited string containing the values from all of the selected options. For select fields you do not typically care about this - use selected or values instead.
output html String containing the text from all of the selected options.
output_in_list html Same as output.
field_id string The identifier for this field.
default_value string The default value for this field if no value is specified.
options object Contains all of the available options for this select list. Each option is a property on the object where they property key is the option value and the property value is the option text.
selected list A list containing the values from all of the selected options.
values list A list containing the text from all of the selected options.
count number The number of selected options.

Examples

Dynamically Include Template from a Select List

Copy
{% if page.page_layout.is_valid %} {% endif %}

Dynamically Include Multiple Templates from a Select List

Copy
{% if page.sidebar_sections.count > 0 %} {% for section in page.sidebar_sections.selected %} {% include section %} {% endfor %} {% endif %}