Return to doc.sitecore.com

Valid for Sitecore 6.0.0, 5.3.2
  Basic Query Expressions
Prev Next

Below is a list of basic expressions used in the query paths:

Expression Description
/ Selects from the root Item
// Selects Items from all descendants of the context Item that match the selection
.. Selects the parent of the current Item
@ Selects fields (please refer to the Attributes section for details)
@@ Selects attributes (please refer to the Attributes section for details)

 

Examples:   

The pipe (“|”) separator is used to select several paths in one expression. For instance:

query:/sitecore/content/Home/Products|/sitecore/content/Home//Circle/..|/sitecore/content/Home//Circle

Output:

Predicates are used to find a specific Item or an Item that contains a specific value.

Predicates are always embedded in square brackets. Below is the description of two groups of predicates available in Sitecore – Attributes and Functions.


Prev Next