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
    Sep 10, 2021 @ 10:25
    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 32 posts 233 karma points
    Sep 15, 2021 @ 07:55
    Lucas Michaelsen
    0

    Hello Peter.

    try to use this xPath instead

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

  • Peter Doyle 10 posts 31 karma points
    Sep 23, 2021 @ 13:11
    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 81 posts 321 karma points
    Sep 23, 2021 @ 13:23
    Erik Eelman
    0

    Hi,

    You can try this xpath query:

    $site/parent
    
  • Peter Doyle 10 posts 31 karma points
    Sep 24, 2021 @ 07:59
    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.

  • Osman Coskun 170 posts 404 karma points
    Jul 25, 2023 @ 19:17
    Osman Coskun
    0

    Hello Peter, Did you able to find a solution? I have a multi site setup and i want to limit the MNTP for just the root nodes.

  • Alfonso Jimenez 6 posts 76 karma points
    Jan 24, 2024 @ 20:07
    Alfonso Jimenez
    0

    Hi Peter, Did you find any solution for this?

  • apload-gmbh 39 posts 109 karma points
    Sep 04, 2024 @ 13:40
    apload-gmbh
    0

    I would also appreciate how you did finally manage it?

Please Sign in or register to post replies

Write your reply to:

Draft