Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon Dingley 1474 posts 3451 karma points c-trib
    Dec 20, 2016 @ 14:28
    Simon Dingley
    0

    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

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Dec 20, 2016 @ 14:38
    Lee Kelleher
    100

    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

  • Simon Dingley 1474 posts 3451 karma points c-trib
    Dec 20, 2016 @ 15:05
    Simon Dingley
    1

    Great thanks Lee, works as I need. NestedContent has to be THE most useful package for Umbraco :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies