0
votes

My Sitecore Content Editor has the following structure:

- Sitecore
  - Content
     - Brand Websites
         - WebsiteOne
             - Website - UK
                 - Pages
                     - Home
         - WebsiteTwo
             - ...
         - WebsiteThree
             - ...     

I am trying to create a multilist that will allow editors to select pages to be displayed in the footer.

I want to allow the Source field of this multilist to be dynamic for the site that the editor is on (WebsiteOne/Two/Three).

I have been exploring the XPath Builder however i am not sure about the dynamic website name part.

Ideally what i want is something like:

./query:/sitecore/content/Brand Websites/[@@name]/Website - UK/Pages/*

Is this possible to dynamically pass the current website into this query?

1

1 Answers

3
votes

You will find your answer here.

Comes down to something like this:

query:./ancestor::*[@@templatename='WebsiteHomeTemplateName']/Pages/*