Options

Options are used for Single Choice Option and Multiple Choice Option attributes.

Options are created using the "Options" menu under the Tools section of the office.

They are then referred to using the Settings part of the Attribute.

For example if a Colour option set is created with different colours as its options, the colour Attribute which is to use the options should have the following for "Attribute Settings":

options=Colour

Options can also come from any part of the WebTemplate database by replacing the name of the options with an absolute path to the parent node of the options, eg if the options are stored under the /Data/Colours node:

options=/Data/Colours

The above example will use nodes of all Node Types for the options. If only nodes of a certain type are to be used, optionType can be specified, eg:

options=/Data/Colours&optionType=Colour

To use criteria to filter the options, optionType and optionCriteria must be specified, eg:

options=/Data/Colours&optionType=Colour&optionCriteria=`Name` LIKE 'b%'
To order the options, use optionOrderBy and optionType, eg
options=/Data/Colours&optionType=Colour&orderBy=Name

To sort numerically:

&optionType=wtNode&optionOrderBy=LENGTH(__name),__name
 

Adding Extra Options
 
To add in extra options not from the database, you can use the 'extraOptions' parameter
 
Example:
 
options=wtYesNo&extraOptions=Conditional:2
 
This will give the standard Yes/No options, plus an extra option with label 'Conditional' and value '2'.
 
Note, the value must be numeric