Copied to clipboard

Flag this post as spam?

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


  • J 447 posts 864 karma points
    Sep 07, 2016 @ 09:23
    J
    0

    Iterate through nodes

    I have the below code in an XSLT file which gets the value from a property and displays the link accordingly

    <xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(mylink) != '0']">
    

    $level is set to 1. What i noticed is when a page is set with an option at root level (i assume this is level 1) then all seems to work fine. If i create a sub page (below the current page) and set the same option then it doesnt work as it did like its parent page.

    My guess is i need to iterate through other levels in order to get this to work.

    How could i change the above line to go through all pages?

  • Alex Skrypnyk 6176 posts 24187 karma points MVP 8x admin c-trib
    Sep 11, 2016 @ 08:42
    Alex Skrypnyk
    0

    Hi J,

    Can you rewrite your maco to razor ?

  • Alex Skrypnyk 6176 posts 24187 karma points MVP 8x admin c-trib
    Sep 20, 2016 @ 16:58
    Alex Skrypnyk
    0

    Hi J,

    I know it maybe not very easy, can you show code of your file?

    What Umbraco are you using?

    Thanks,

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft