{{ Select }}

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

Properties

true/false is_valid
True if the value is not empty
String field_id
The name of the custom field
String value
Delimited string containing all of the selected values
String properties
Any additional properties used to configure this field
String output
<span class="mp-field-value mp-field-select"><span class="mp-field-value mp-field-select-selection">Selected Option 1</span> <span class="mp-field-value mp-field-select-selection">Etc...</span></span>
Dictionary<string, string> options
A dictionary containing all of the available options where the dictionary key is the option value and the dictionary value is the option text
List<string> values
A list containing the text from all of the selected options

Sample Use

{% unless page.page_layout.value == 0 %} <div class="sidebar-{{ page.page_layout.value }}"> {% assign includeTemplate = "Sidebar-" | append:page.page_layout.value %} {% include includeTempalte %} </div> {% endunless %}

With Multiple Options

{% unless page.sidebar_sections.values == empty %} {% for section in page.sidebar_sections %} {% include section %} {% endfor %} {% endunless %}