Copied to clipboard

Flag this post as spam?

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


  • mInNaL 8 posts 51 karma points
    Feb 28, 2013 @ 11:52
    mInNaL
    0

    List all root pages

    I need a XSLT help for Umbraco.

    My content tree looks like this:

        Language 1
            SubPage 1
            SubPage 2
            SubPage 3
        Language 2
            SubPage a
            SubPage b
            SubPage c
        Language 3
            SubPage x
            SubPage y
            SubPage z
        Language 4

     

    I need to make a XSLT which lists all the root nodes(language1, 2, 3 etc)  in main content structure Umbraco.

    Hope anyone here can help me with this.

  • Rich Green 2246 posts 4008 karma points
    Feb 28, 2013 @ 12:03
    Rich Green
    0

    Hey,

    Add a new XSLT file and select the 'Site Map Example' from the Drop Down, in here there is a variable for 'Level' have a play with it and it should give you a good starting point.

    Rich

  • Alex Skrypnyk 6175 posts 24176 karma points MVP 8x admin c-trib
    Feb 28, 2013 @ 12:10
    Alex Skrypnyk
    0

    Hi mInNaL)

    Do you need language switcher ?

    Something like that will take you all root nodes:

            <xsl:for-each select="$currentPage/ancestor-or-self::root/*[parent::root]">

     

    Thanks,

    Alex

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Feb 28, 2013 @ 12:13
    Jeroen Breuer
    100

    This might work:

    <xsl:for-each select="$currentPage/ancestor::root/*">
    <!-- Show language nodes -->
    </xsl:for-each>

    Jeroen

  • mInNaL 8 posts 51 karma points
    Feb 28, 2013 @ 12:16
    mInNaL
    0

    I have tried that.. but it doesn only return childs of the first parent node (in my case all childe nodes of Language 1)

    Note Language 1, 2 and 3.

    I have tried changing level to 0 still no help. 

  • Rich Green 2246 posts 4008 karma points
    Feb 28, 2013 @ 12:17
    Rich Green
    0

    Could you post a screen shot of your content tree.

    Rich

  • Alex Skrypnyk 6175 posts 24176 karma points MVP 8x admin c-trib
    Feb 28, 2013 @ 12:18
    Alex Skrypnyk
    0

    maybe you have some problem with publish nodes ?

Please Sign in or register to post replies

Write your reply to:

Draft