Set an MNTP Start Node to the document on which the Nested Content property exists
Is it possible to set the startNode for an MNTP contained within a NestedContent property? I would like to set the start node as the node on which the NestedContent property exists (relatively, e.g. $parent) since the MNTP content is not actual content and has no id I'm not sure if I can?
I hope that makes sense as it started to make less sense as I wrote it!?
Set an MNTP Start Node to the document on which the Nested Content property exists
Is it possible to set the startNode for an MNTP contained within a NestedContent property? I would like to set the start node as the node on which the NestedContent property exists (relatively, e.g.
$parent
) since the MNTP content is not actual content and has no id I'm not sure if I can?I hope that makes sense as it started to make less sense as I wrote it!?
Cheers, Simon
I think only works on published nodes?
Looking at the Umbraco core source for the XPath query parser, both "
$current
" and "$parent
" should work.https://github.com/umbraco/Umbraco-CMS/blob/release-7.5.6/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs#L71
If the current node is unpublished, then Umbraco will try to look for the closest published node.
Hope this helps?
Cheers,
- Lee
Great thanks Lee, works as I need. NestedContent has to be THE most useful package for Umbraco :)
is working on a reply...