Sitecore Field Source as XPath, Query or FastQuery Cheat Sheet

Being a developer I always like to have handy quick reference guides (so called cheat sheets) to whom I can refer and clear few of my simple concepts. This post is about a cheat sheet informing about Sitecore fields that support XPath, Sitecore Query and Sitecore Fast Query syntax in the source field.

Before we move on to details about Sitecore Field Source as XPath, Query or FastQuery Cheat Sheet I would like to reference few already available cheat sheets for Sitecore.

An experienced Sitecore developer already understands about the importance of Source field, through which content authors can be restricted or guided to select required Sitecore items only.

For a novice Sitecore developer, I would suggest to refer section “Source Field” of this post.

So here comes the cheat sheet now showing field types that support source as XPath, Sitecore query and Sitecore fast query.

Source-Field-Cheat-Sheet

Note: Other fields like Page Preview, Query Builder not listed in the cheat sheet do not support any of the three above sources hence they are not mentioned.

Source Field

The source property provides information that influences the user interface control associated with the field in the Content Editor. The behavior of the source field depends on the field’s type.

Sitecore-SourceField

Few usages of Source Field

  • For list field types, such as Droplink, the source property indicates a location in the content tree that includes the items included in the list displayed by the field.
  • For image and file types, the source property indicates the start folder displayed in the media library dialog.
  • For rich text field definitions, the item specified in the source property specifies a HTML editor profile controlling the features provided by the editing interface.
  • For selection fields, the field source property may specify a Sitecore query using the “query:” prefix before the actual query statement. For e.g. query:/sitecore/content/*/*[@@templateid='{76036F5E-CBCE-46D1-AF0A-4143F9B557AA}’]
  • For selection fields, the field source property may also specify a Sitecore fast query using the “fast:query:” prefix before the actual query statement. For e.g query:fast:/sitecore/content/*/*[@@templateid='{76036F5E-CBCE-46D1-AF0A-4143F9B557AA}’]

3 thoughts on “Sitecore Field Source as XPath, Query or FastQuery Cheat Sheet

Add yours

  1. The queries don’t work in the general link and general link with search field – how would those work?

      1. Right – as I said, in your table it says General Link and General Link with Search supports xpath, but it does not.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: