Prev Next |
Attribute: [@fileldname]
Description: Item field name.
Query Example:
query:/sitecore/content/Home/*[@Title = 'Welcome to Sitecore']
Returns Items which have the value of the field 'Title' set to 'Welcome to Sitecore'. The search is performed among the children of the Home Item.
Note : Use the database field values when using fields in your query expressions. Read more about how field values are stored in the database.
query:/sitecore/content/Home/Products/Hammer[@Available = '1']
Returns all Hammer named Items which have the value of the checkbox field 'Available' set to '1'.
Attribute: [@@name]
Description: Item name. Case sensitive.
Query Example:
query:/sitecore/content/Home/Products/*[@@name = 'Hammer']
The search is performed among the children of the Products Item.
Attribute: [@@key]
Description: Item name lowercased. For example: [@@key = 'item'] will match iTEm and Item. Note: the key must be in lowercase.
Query Example:
query:/sitecore/content/Home/Products/*[@@key = 'hammer']
The search is performed among the children of the Products Item.
Attribute: [@@templateid]
Description: Item Template ID.
Query Example:
query:/sitecore/content/Home//*[@@templateid = '{F348C2A0-73B8-4AF4-BD9E-2C5901908369}']
Returns all descendants of the Home Item based on the template with the mentioned ID.
Attribute: [@@templatename]
Description: Item Template name. The value is case sensitive.
Query Example:
query:/sitecore/content/Home//*[@@templatename = 'Shape']
Returns all descendants of the Home Item based on the Shape template.
Attribute: [@@templatekey]
Description: The template name in lowercase.
Query Example:
query:/sitecore/content/Home//*[@@templatekey = 'product']
Returns all descendants of the Home Item based on the Product template.
Attribute: [@@id]
Description: Item ID.
Query Example:
query://*[@@id = '{787EE6C5-0885-495D-855E-1D129C643E55}']
Searches through the entire content tree and returns an Item with the mentioned ID.
Other Examples:
Query expressions may be quite complex:
query:/sitecore/content/Home//*[@@id='{D394CCA7-C88B-418C-8B2B-AA97AA52EE14}' or @@key = 'stylish bag' or @@name = 'Hammer']
Result:
query:/sitecore/content/Home//*[@Text='Bargain Price' and @Available='1']
Result:
Prev Next