Copied to clipboard

Flag this post as spam?

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


  • Peter Doyle 10 posts 31 karma points
    18 days ago
    Peter Doyle
    0

    Multinode Treepicker not allowing root as start node

    I have an install with multiple sites and I need a picker that will allow me to select the homepages. I would have used nuPickers for this in the past but they do not work with the version of umbraco I am using(8.15.2).

    When I add $root into the xpath query field the picker always defaults to the current folder of the current node rather than defaulting to the root.

    Example structure:

    Home 1:

    • Blog
    • About

    Home 2:

    • Blog
    • About

    Shared Blog posts:

    • Post 1
    • Post 2
    • Post 3
    • Post 4
    • Post 5

    In this example I would like to be able to pick a home node from within Post 4 but the MNTP defaults to the Shared Blog posts page.

    Any help on this would be greatly appreciated.

  • Lucas Michaelsen 12 posts 146 karma points
    1 week ago
    Lucas Michaelsen
    0

    Hello Peter.

    try to use this xPath instead

    $currentPage/ancestor-or-self::*[@level = -1]

  • Peter Doyle 10 posts 31 karma points
    5 days ago
    Peter Doyle
    0

    Thanks for you suggestion Lucas, but that returns an error as the and would in theory return the same as $root anyway.

  • Erik Eelman 55 posts 217 karma points
    5 days ago
    Erik Eelman
    0

    Hi,

    You can try this xpath query:

    $site/parent
    
  • Peter Doyle 10 posts 31 karma points
    4 days ago
    Peter Doyle
    0

    Erik, that does indeed return $root without an error but the tree picker seems to still revert to the section of the page the picker is located on.

    The "Shared Blog posts" section has a list view and I think this is forcing it to revert to the current list view rather than show the root of the site.

Please Sign in or register to post replies

Write your reply to:

Draft