Copied to clipboard

Flag this post as spam?

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

  • Renaldas 1 post 21 karma points
    Jul 19, 2022 @ 05:32

    Multinode Treepicker XPATH value from the same page

    I want to set start node in Multinode Treepicker using XPATH, but want to filter based on another property (also Multinode TreePicker with selected node) in nested element which sits on the same page, how to do that? any ideas?

    I was able to load using hardcoded ID = 1003, but unable to figure out how to do automatically from the property:

    /descendant-or-self::*[@id = 1003]


  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 7x admin c-trib
    Jul 20, 2022 @ 06:18
    Chriztian Steinmeier

    Hi Renaldas,

    I don't think it's possible to do that, because you would need to use the $current placeholder somewhere inside the XPath, e.g.: *[@id = $current/startNode] but placeholders only work at the beginning of the string.

    Also, when you say "nested element" does that mean it's inside a BlockList or Nested Content property? Because that would really complicate things (they store blobs of JSON, which (AFAIK) is not converted to something meaningful for XPath selection, which means you'd need to find the node's UDI using text-manipulation, which was never really meant to be done with the version of XPath supported in Umbraco/.NET


Please Sign in or register to post replies

Write your reply to: