Picklists v3.1
Purpose | The following page is the main page for the Picklists User Guide. |
Prerequisites |
|
Supplementary |
|
Picklists are a new variable type that can be used in v3.1. They are currently text values only but can be used to create dropdown menus within content editing to allow easier selection of commonly used values.
For example, a picklist of heading classes could be applied to a regularly used component. heading-1 to heading-6 could be in this picklist and easily selected by a content editor, allowing powerful control and customisation of components and content.
Picklist items can be selected in the following places:
the default value of a picklist component variable
in page content that uses a picklist component variable
in data feed definitions
A single value from the list can be selected, or multiple values can be selected. A "separator" can be implemented when defining the variable within the component. This allows us to define how we separate the values, depending on the use case. The separators options are:
None
Space
Comma
Comma Space
Pipe
Double Pipe
Why should I use picklists?
Picklists have been created to give developers and component creators the frequently requested ability to select commonly used text values from a dropdown menu. This enables them to have cleaner code in a component (instead of 5 variable declarations, you only need one) and allows content editors to see the options available more easily.