Copied to clipboard

Flag this post as spam?

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


  • Mats Ulrik Krüger 5 posts 65 karma points
    Jan 17, 2013 @ 21:49
    Mats Ulrik Krüger
    0

    Display all subnode subnodes

    Hello guys

    I'm new to all this xslt stuff.

    I want to display nodes from my child pages children

    - News    <-- this is where i want the node to display

      - 2012

        - Hello world!      <-- this is this node i want to display

      -2011

    I found a code which does this but it also displays the 2012 node.

    http://our.umbraco.org/forum/developers/xslt/12777-List-all-pages-and-sub-pages-from-current-node

    Can you guys please help.

    Thanks

  • Mats Ulrik Krüger 5 posts 65 karma points
    Jan 17, 2013 @ 22:32
    Mats Ulrik Krüger
    100

    Hello I figured out that i could use

    <xsl:for-each select="$currentPage/*/*">

    But thanks anyway

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Jan 18, 2013 @ 08:05
    Chriztian Steinmeier
    0

    Hi Mats,

    Just for future proofing, you may consider modifying that just a little bit:

    <xsl:for-each select="$currentPage/*[@isDoc]/*[@isDoc]">

    This will make sure only to traverse "document" nodes in the XML, and not properties as well.

    It may not be a problem now, but if you later add a datatype that stores XML (e.g., the Multi-Node Tree Picker) you will begin to see some weird results.

    Also, if you add anything using position() (like odd/even rows etc.) you'll most likely see some weird jumps in the numbers you get.

    Anyway - just a small heads-up — welcome to the forums, and if you keep solving your own questions, you'll soon be an Umbraco expert :-)

    /Chriztian 

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies