Link Field Types
This is the fourth post as part of Sitecore Template series.
Sitecore 8.2 (rev. 160729)
In last two posts, we discussed about Simple field types & List field types, now let’s look into Link field types.
Link types:
Link field types allow content authors to enter links to Sitecore internal items, external URLs, anchors, and email addresses.
- Droplink: Similar to the Droplist field type, which we had seen in the previous post, this field type also allows the content author to select a single item from the list specified by the source property of the field. If the source is not set, no items are shown in the drop-down.
Field source can be set while declaring the field, using Source property.
Raw value: Selected Item GUID
Field type class: Sitecore.Data.Fields.RefernceField
Field Renderer supported: No
Allowed format in source field property: GUID, Path, and XPath Query
- Droptree: This field type also allows the content author to select a single item from the list specified by the source property of the field. Items are shown in tree-view rather than the normal drop-down. If the source is not set, it shows the entire tree.
Raw value: Selected Item GUID
Field type class: Sitecore.Data.Fields.RefernceField
Field Renderer supported: No
Allowed format in source field property: GUID, Path, and XPath Query
- General Link: This is the most frequently used link field type. This type allows content authors to link to a Sitecore item, an external URL, an anchor, an email address, or a JavaScript function.
Raw value: XHTML
Field type class: Sitecore.Data.Fields.LinkField
Field Renderer supported: Yes
- General Link with Search: This is similar to General Link field type, except that this one is having an extra link search functionality. Using this, content authors can search (for Internal link) and link to items.
Recently we come across a scenario where clients want to search for an item to link, because it is tedious for them to navigate to that item, (we can use other field types, but they want to ) this field type came to our rescue 🙂
Raw value: XHTML
Field type class: Sitecore.Data.Fields.LinkField
Field Renderer supported: Yes
Version Identity: and Version Link: field types are used by Sitecore for internal purposes.
Till now we looked into Simple, List, and field types. But there are other field types which are not so frequently used by developers.
- Analytics
- Social
- Developer Types
- System Types
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.
References:
- https://sdn.sitecore.net/upload/sitecore6/65/data_definition_reference_sc64-65-usletter.pdf
- http://www.mtelligent.com/home/2014/8/29/sitecore-field-type-overview-reference.html
Happy Learning 🙂