Sitecore: set relative data source when using branch

I am trying to use a branch template for the first time.

Here I need to specify Item as the data source for the treelist field for another element. And both are in the same branch.

enter image description here

Before using the branch, in the Menucollection data template I gave the path to "MenuItems" directly. With branching, how can we make this dynamic ?, since each item that I created using the branch can have different items in the "MenuItems".

+4
source share
1 answer

You can set the source field for the relative query:

query:../../MenuItems

Sitecore, :

query:./ancestor-or-self::*[@@templateid = '{parent-template-guid}']/*[@@templateid = '{MenuItems-template-guid}']"

, Treelist , , .

+4

Source: https://habr.com/ru/post/1650511/


All Articles