Copied to clipboard

Flag this post as spam?

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


  • Horst Sterr 171 posts 133 karma points
    Jul 02, 2015 @ 20:12
    Horst Sterr
    0

    xPath Expressions

    Hi,

    which xPath Expressions are supported. In my case I would have to go 2 Levels up. Is this possible?

    g/h

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 7x admin c-trib
    Aug 24, 2015 @ 07:00
    Chriztian Steinmeier
    1

    Hi Horst,

    Looking at the source on GitHub, it looks like you can use these tokens: $current, $parent, $site & $root in the XPath queries - to go 2 levels up, I'd use this:

    $parent/parent::* (or simply $parent/..)

    Using $parent instead of $current should work even when the current page hasn't been published yet.

    Hope that helps,

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft