I've been looking at improving the user experience for the editors of some of our multi-sites. And specifically to lessen the need for editors to navigate when looking for certain items in the multi node content picker.
Fetching the data node with xpath usually works out just fine when I only have one site to worry about, however when using it with multi site my query "$root//ProductPage" will always find the first "ProductPage" even if it's located in the "wrong" site.
The site tree looks like this.
Site 1
- ProductPage1
SIte 2
- ProductPage2
Shared Data
- Products
The content picker is located in a document type under Shared Data/Products, so I cannot relate it to the $site selector.
Any ideas if this is even possible or a direction I should be looking?
Thank you for your reply Søren, but wouldn't this just grab the root node of the current node? So if the content picker exists in my shared folder it would only look in the shared folder?
Xpath relative to current hostname
I've been looking at improving the user experience for the editors of some of our multi-sites. And specifically to lessen the need for editors to navigate when looking for certain items in the multi node content picker.
Fetching the data node with xpath usually works out just fine when I only have one site to worry about, however when using it with multi site my query "$root//ProductPage" will always find the first "ProductPage" even if it's located in the "wrong" site.
The site tree looks like this.
The content picker is located in a document type under Shared Data/Products, so I cannot relate it to the $site selector.
Any ideas if this is even possible or a direction I should be looking?
Hi Thomas
Theres a
$site
variable you can use too, so you should be able to get the right product page by setting the query to$site//ProductPage
.Thank you for your reply Søren, but wouldn't this just grab the root node of the current node? So if the content picker exists in my shared folder it would only look in the shared folder?
is working on a reply...