I'm using the following query as a Source for my Droplink field:
query:fast:/sitecore/content/Home/AboutPages//*[@@templateid!='{41BF6376-A2D4-4CF1-80C5-223067C84811}']
My intention is for this query to grab all of the pages directly under AboutPages but exclude everything in Content folders on all levels (These content folders have a template ID of {41BF6376-A2D4-4CF1-80C5-223067C84811}). Is there a way to restrict this query to all page items aside from items located within Content folders? As of now, I'm not grabbing the Content folders themselves but I am grabbing all of the child items under these folders which I do not want to include.
Edit:
As an additional note, I cannot simply grab all pages under AboutPages by template ID because the pages themselves may have different templates.
Edit 2:
As a quick example I could have the following page structure:
- About Pages
- Page 1 (Template ID = "{53BC28A6-0A7D-4CDD-A53E-7AB78A20B5AF}")
- Content Folder
- Accordion
- Content Folder
- Page 2 (Template ID = "{81C65AE0-5BBB-4A99-BC7F-BCA463AFEE06}")
- Page 3 (Template ID = "{881959CF-3617-4D36-9389-0DB2CA382F9A}")
- Content Folder
- Carousel
- Content Folder
- Page 3 (Template ID = "{881959CF-3617-4D36-9389-0DB2CA382F9A}")
- Content Folder
- Page 1 (Template ID = "{53BC28A6-0A7D-4CDD-A53E-7AB78A20B5AF}")
I need the query to return Page 1, Page 2, and Page 3 while excluding items in the content folder (Accordion, Carousel). My best guess for how to do this now is to find the template IDs of all possible pages and include those in the query but I was hoping for a more elegant solution.
fast://some/path//*[@@templateid != '{41BF6376-A2D4-4CF1-80C5-223067C84811}']/*
. In your case, though, I don't think it'll help you, since the pages directly underAbout Pages
won't be selected with this approach. If you could start one level higher thanAbout Pages
, then there'd be potential to make it work.