Template Source Query for Relative Location

Say you are setting up a new template. And inside that you have a field that perhaps has a drop down or a tree list of items that are based upon the children of where that item is.

Perfect example is having a news release page and using the tree list to pick and show specific items but you want it to only pick from the children directly below it.

In order to set the source of the query such that it makes picking the items easier, you’d use the following:

../*

Now if that doesn’t work, as I see there are potential bugs for some versions of Sitecore and if that’s the case you’d want to use the following query instead.

ancestor-or-self::*