Return to doc.sitecore.com

  Reference
Prev Next

Use to create a field which allows a user to select an Item from a content tree.

Client view:

Reference type inserts a field with a drop-down menu. 

/upload/sdn5/reference/field reference/standard data types/reference1.png

When a user clicks on the field, the content tree appears allowing to select an Item. 

/upload/sdn5/reference/field reference/standard data types/reference2.png 

Valid default value:

GUID string. For example:

{6D12058D-A949-4DDB-B081-EDC7A675D5AB}

Source:

Use the Source field to specify the Item which will be the entry point for lookup (i.e. the root item).

For example, you want to direct the user straight to the list of shapes instead of making him browse the entire content tree. In this case, you should specify the shapes Item which contains shapes as a source for lookup.

/sitecore/content/Home/Shapes

You will observe the following behavior in the Client:  

/upload/sdn5/reference/field reference/standard data types/reference3.png

For information about accessing the field values programmatically, please follow the links below:

Accessing Reference field value in C#

Accessing Reference field value in XSLT 


Prev Next