Skip to content

Instantly share code, notes, and snippets.

@JamesSkemp
Last active January 14, 2021 14:20
Show Gist options
  • Save JamesSkemp/99b7e5364d9199c4321a to your computer and use it in GitHub Desktop.
Save JamesSkemp/99b7e5364d9199c4321a to your computer and use it in GitHub Desktop.
Sitecore - Fast queries to find items with a particular template/sublayout.

This will find items matching a particular template.

fast://*[@@templateid='{072A5DF2-4283-4043-9A4F-7D1218F4D899}']

Without text in the item name.

fast://*[@@templateid='{0400B345-381D-4BAF-8B83-85DD52632FE5}' and @@name != '%test%']

Created after a certain date.

fast://*[@@templateid='{0400B345-381D-4BAF-8B83-85DD52632FE5}' and @@name != '%test%' and @__Created >= '20150201']

This will find items that have a particular sublayout.

fast://*[@__Renderings='%{D1473911-D4F7-4990-B035-09A2C689BF58}%']

This will find items that a particular custom field value.

fast:/sitecore/content/Bus/#Meta-Data#/Board Members/*[@Board = 'OTM']
@JamesSkemp
Copy link
Author

JamesSkemp commented Dec 22, 2017

Note that in Sitecore 8.x the XPath Builder can be found at /sitecore/shell/default.aspx?xmlcontrol=IDE.XPath.Builder

It has been removed in 9.x+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment