I want to set the source of a droptree to the item so every time I create an instance of that template I can select it's children. Obviously I can't add the ID of the item to the template as it will be different for every instance of the template.
I tried $id
in the vain hope that that might work but it didn't.
Is there a way to do this?
I think you can just use a query and simply set the source to a relative path:
query:./*
This should set the source to the children of the current node.
Bonus: you can use most query expressions as source, making it possible to filter items based on templates or more complex operations. Check out the query doc at SDN to get started.
You can always use simple XPath queries such as self:: or parent:: . For sets of items it could be descendant::
or child::
. But in your case I believe it will be self::
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With