Copied to clipboard

Flag this post as spam?

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


  • Bert 128 posts 251 karma points
    May 11, 2011 @ 16:56
    Bert
    0

    recursive page value

    To pass a property recursive to a macro we should use the [#property] syntax.

    I'm using a property that doesn't exist on each node. Will umbraco skip nodes that doesn't have this property and keep looking or will the search stop when the property isn't found on one node?

  • Chriztian Steinmeier 2732 posts 8339 karma points MVP 5x admin c-trib
    May 11, 2011 @ 18:12
    Chriztian Steinmeier
    1

    Hi Bert,

    Yes, as far as I know, Umbraco will travel up the tree to find the first node that has a value for it.

    To do it with XSLT (which I know for sure will work), you do this:

    <xsl:value-of select="$currentPage/ancestor-or-self::*[normalize-space(PROPERTY_NAME)][1]/PROPERTY_NAME" />

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft