This section describes how the DataFieldDropdown part is used within the CMS in order to dropdown select lists to pages/content items. Multiple DataFieldDropdown parts can be added to Content Types as required, allowing multiple select lists to be added.
Tip
The DataFieldDropdown part should only be used for entering short pieces of data, if any additional formatting is required e.g. bold, underline, adding links etc. you should use the Body part instead.
Content Type Settings
The Content Type Settings for the DataFieldDropdown part allows for you to choose the options which will be displayed within the select list on the Content Item.
Content Item Settings
Each DataFieldDropdown part added to a Content Type, will result in a corresponding select dropdown box being added to the content item, allows you to choose multiple output options from a select list - an example of usage for this could be a list of Categories.
Using the Part in Templates
The template code is used to determine how the selected option (on each content item) will be displayed on the corresponding webpage.
Assuming the DataFieldDropdown part name is set to 'DataFieldDropdown', the selected dropdown option can be output using the following handlebars code {{this.DataFieldDropdown}} had the part name been set to Part1 instead, the corresponding handlebars code would become {{this.Part1}}.
Additional HTML code can then be used to wrap the DataFieldDropdown output as required, for example if the DataFieldDropdown is designed to set a span value the following code could be used <span>{{this.DataFieldDropdown}}</span>.