Copied to clipboard

Flag this post as spam?

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


  • Philip 13 posts 33 karma points
    Oct 21, 2010 @ 14:54
    Philip
    0

    Display list of nodes on every page of site?

    I'm trying to find a way of displaying a list of nodes on every page of my site. The nodes I want to display sit under a specific node. Is there a way I can show every node under the specified node ID?

    Thanks for any help.

  • Rob Stevenson-Leggett 38 posts 110 karma points
    Oct 21, 2010 @ 17:05
    Rob Stevenson-Leggett
    0

    An Xslt macro similar to the sitemap one should do the job. You can create the sitemap xslt by going the Developer section and right clicking on the XSLT folder then select the sitemap template.

    You should change to use this instead of searching by level.

    umbraco.library:GetXmlNodeById(<YourID>)/node

     

  • Kim Andersen 1447 posts 2196 karma points MVP
    Oct 21, 2010 @ 17:55
    Kim Andersen
    0

    Hi Philip

    In case you are not a XSLT ninja, you should be able to to it the following way, by using the code that Rob also suggested:

    <xsl:for-each select="umbraco.library:GetXmlNodeById(theIdHere)/*[@isDoc]">
       
    <xsl:value-of select="@nodeName" />
    </xsl:for-each>

    /Kim A

  • Kim Andersen 1447 posts 2196 karma points MVP
    Oct 21, 2010 @ 18:48
    Kim Andersen
    0

    And of course Philip, if you are using the old XML schema you need to modify the code a bit to:

    <xsl:for-each select="umbraco.library:GetXmlNodeById(theIdHere)/node">
       
    <xsl:value-of select="@nodeName" />
    </xsl:for-each>

    /Kim A

Please Sign in or register to post replies

Write your reply to:

Draft