Copied to clipboard

Flag this post as spam?

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


  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 04, 2013 @ 00:17
    Anthony Dang
    0

    Setting root of Multinode tree picker

    Here is my tree:

    Site
    - Blog
      - Posts
        - 2013
          - MyPost
      - Tags
        - Tag1
        - Tag2

     

    In MyPost I want to have a MNTP which allows me to select Tags. Normally I would just use XPath or a node ID to set the Tags node as the root of the MNTP.

    The issue when it's a node ID is the root of the MNTP is no longer valid when I install the blog from a package.

    I'm not sure if it's possible with XPath, but I want to traverse up the tree until I hit a uBlogsyLanding node, then, traverse down until I hit the Tags node.

    I want this to work for all scenarios, since people have all types of configurations for their trees. Eg. I've seen the uBlogsyLanding node in the tree at levels 1,2,3, and even 4.

    Basically I'm just wondering if this is possible, and if anyone could provide a solution (possibly xpath).

     

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Feb 04, 2013 @ 00:32
    Chriztian Steinmeier
    0

    Hi Anthony,

    Should be possible with this XPath (need to supply the exact doctype aliases for uBlogsyLanding and Tags):

    $currentPage/ancestor-or-self::uBogsyLanding//Tags

    (Can't remember if this will work when $currentPage hasn't been published yet, otherwise substitute $parentPage instead)

    /Chriztian

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 06, 2013 @ 13:48
    Anthony Dang
    0

    Sweet. That worked!

    Thanks!

     

     

Please Sign in or register to post replies

Write your reply to:

Draft