Copied to clipboard

Flag this post as spam?

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


  • Anton 135 posts 186 karma points
    Mar 20, 2012 @ 15:05
    Anton
    0

    What the best way to get all nodes?

    Every day added two hundred nodes on the site. What the best way to get all nodes? Now I get all nodes by uComponent. As I understand it get data from XML file umbraco.config. It will be troubles when I have huge list of nodes, isnt it? 

  • sundip 76 posts 339 karma points
    Oct 18, 2012 @ 19:19
    sundip
    0

    Create new xslt and related macro. Put the code below into xslt  under <stylesheet></stylesheet>. Using this macro you will get the list of all nodes to the page.

    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">

    <xsl:variable name="nodes" select="$currentPage/nodes" />

    <xsl:apply-templates select="$nodes" />

    </xsl:template>

    <xsl:template match="values">

    <li><xsl:value-of select="." /></li>

    </xsl:template>

    Thanks,

    Sundip

  • 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