Query notation for the sitecore 'source' field in template builder
Fields that support Sitecore Query
Where you can use the syntax query:
or fast:
(for FastQuery):
- Droplist
- Grouped Droplist
- DropLink
- Grouped Droplink
- Checklist
- Multilist
- Droptree
Fields that support Parameterized Datasource
Where you can use enhanced syntax with Parameterized datasourcequery:
- Droptree †
- Treelist
- TreelistEx
† Droptree only supports the Datasource
and DatabaseName
parameters.
The enhanced query string syntax includes the following parameters:
- Datasource
- DatabaseName
- AllowMultipleSelection
- IncludeItemsForDisplay
- ExcludeItemsForDisplay
- IncludeTemplatesForSelection
- ExcludeTemplatesForSelection
- IncludeTemplatesForDisplay
- ExcludeTemplatesForDisplay
These are used like this: Datasource=/sitecore/content/home/Products/&IncludeTemplatesForDisplay=Product Category&ExcludeTemplatesForSelection=Product Description&IncludeTemplatesForSelection=Product Category
Mark Ursino has a great post on how to use this kind of syntax here.
What you have here should work with the Droplink field. Perhaps you are referring to Droptree?
query:./ancestor::*[@@templatename='CountryHome']/METADATA/Regions/*
As for the TreelistEx, I don't think the default Treelist fields support Sitecore query. However, this article describes how to create a custom TreeList that supports it.