I have a template in Sitecore which contains a Multilist field which I am using to allow editors to select a number of child pages of the current page [which uses this template]. I know how to set the Source of the field to point to a particular location within the content tree (e.g. sitecore/content/home/help/), but cannot figure out how to set it so that it only allows selection of child items of the current item.
3
votes
2 Answers
3
votes
If I understand you correctly, you'd like the list of available items to be just the children of the current item. If that's the case, then use just the dot (.) in the Source field. For more details take a look at Data Definition Cookbook, especially 2.4.2 How to Control the List of Items in a Selection Fields paragraph.
0
votes
Sitecore allows for initial values to be specified in fields using tokens. Available tokens are:
- $name = Node name
- $id = Item id
- $parentid = Item parent id
- $parentname = Parent node name
- $date = Current date
- $time = Current time
- $node = Current date and time
I think you're best off creating your own replace token, say: $path that should be replaced with the current item's (item being added) path.