Saturday Sitecore Learning - Templates Part 3 (List Field Types)

List Field Types

This is the third post as part of Sitecore Template series.

Sitecore 8.2 (rev. 160729)

In the previous post, we discussed about Simple field types, in this post let’s look into List field types.

List types:

List type fields allow content authors to select one or multiple values, ex: countries, categories, etc.

  • Multilist: This is one of the most commonly used list type, using this type, content authors can choose one or more items, from the list, which are based on the source property of the field specified. If the field source is not specified, selectable list becomes empty. Field source can be set while declaring the field, using Source property.
    Raw value: Pipe separated GUID’s
    Field type class: Sitecore.Data.Fields.MultilistField
    Field Renderer supported: No
    Allowed format in source field property: GUID, Path, and XPath Query

  • Multilist with Search: This is similar to Multilist field type, but having a search functionality. When there are large number of selectable items, this field type aids content authors to search and choose items.
    Raw value: Pipe separated GUID’s
    Field type class: Sitecore.Data.Fields.MultilistField
    Field Renderer supported: No
    Allowed format in source field property: GUID, Path, and XPath Query

  • Treelist: This list type, lists all the selectable items in tree structure, including the parent item. If no source is specified, it will list whole Sitecore tree.
    Raw value: Pipe separated GUID’s
    Field type class: Sitecore.Data.Fields.MultilistField
    Field Renderer supported: No
    Allowed format in source field property: GUID, Path, XPath Query, and query string

  • TreelistEx: This is pretty much similar to Treelist, except that for this field type, the selection option will be opened in a new browser window (pop up); when no source is specified, this also lists the entire tree. TreelistEx field type performance is better than Treelist field type, because for TreelistEx, the client renders only the list of selected items, and does not render the selection tree until the user clicks the Edit command which is present above the field.
    Raw value: Pipe separated GUID’s
    Field type class: Sitecore.Data.Fields.MultilistField
    Field Renderer supported: No
    Allowed format in source field property: GUID, Path, XPath Query, and query string

  • Checklist: The list type allows the user to select one or more checkboxes representing the children of the item specified by Source property of the field. Unlike other list types, content authors cannot order their selection.
    Raw value: Pipe separated GUID’s
    Field type class: Sitecore.Data.Fields.MultilistField
    Field Renderer supported: No
    Allowed format in source field property: GUID, Path, XPath Query

  • Droplist: The Droplist field type allows the content author to select a single item from the list specified by the Source property of the field.
    Raw value: string (name of the selected item)
    Field Renderer supported: No
    Allowed format in source field property: GUID, Path, XPath Query

  • Grouped Droplist: This field type allows content author to select a single grandchild of the item specified by Source property of the field. This type stores the name of selected item.
    Raw value: string (name of the selected item)
    Field Renderer supported: No
    Allowed format in source field property: GUID, Path, XPath Query

  • Grouped Droplink: This is very much similar to Grouped Droplist field type, except that, The Grouped Droplink field type stores the GUID of the selected item.
    Raw value: GUID (ID of the selected item)
    Field type class: Sitecore.Data.Fields.ReferenceField
    Field Renderer supported: No
    Allowed format in source field property: GUID, Path, XPath Query

  • Name Value List: This field type allows the content authors to enter values in key-value pairs. When first key, value pair is entered, another row will appear to enter next set of values. Sitecore stores the values entered as a list of key=value pairs separated by ampersands (“&”). I had seen this in real time for Brightcove media framework, for each Brightcove video item, we have custom fields getting imported in name-value pairs.
    Raw value: key=value pairs separated by ampersands (“&”)
    Field type class: Sitecore.Data.Fields.NameValueListField
    Field Renderer supported: No

  • Name Lookup Value List: This field type is similar to Name Value List field type, in Name Value List, content author has to enter both key & value pair, but here content authors enters keys, and for value choose an item from populated drop-down list.
    Raw value: key=value pairs separated by ampersands (“&”)
    Field type class: Sitecore.Data.Fields.NameValueListField
    Field Renderer supported: No

Raw value: A value which gets stored in the database for each field.
Field type class: Using which developer can access the field values.
Field Renderer supported: Field type has corresponding FieldRenderer web control, when used, content authors can use Experience editor to manage the content for particular field.

In next post, will look into Link types.

References:

Happy Learning :)

Share