Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I'm trying to list the whole site structure from a changeable source, but it's currently not returning anything. Can anyone see what's wrong with the following XSLT:
<xsl:param name="currentPage"/><!--xsl:variable name="source" select="/macro/source" /--><xsl:variable name="source" select="4444" /><xsl:template match="/"> <xsl:call-template name="drawNodes"> <xsl:with-param name="parent" select="umbraco.library:GetXmlNodeById($source)" /> </xsl:call-template></xsl:template><xsl:template name="drawNodes"> <xsl:param name="parent" /> <ul> <xsl:for-each select="$parent/node"> <li> <xsl:value-of select="@nodeName" /> <xsl:if test="count(./node) > 0"> <xsl:call-template name="drawNodes"> <xsl:with-param name="parent" select="." /> </xsl:call-template> </xsl:if> </li> </xsl:for-each> </ul></xsl:template>
(I'm hard coding the source node id to eliminate that from enquiries!)
Old schema, 4.0.1, by the way.
Thanks all.
Hi Dan,
I'd take a look at the XML for node '4444' ... to check if there are any child <node>s?
The rest of the XSLT looks fine to me.
Cheers, Lee.
Ah, that was a weird one. Definitely nodes under 4444, and I tried other nodes too, but nothing. Republished the whole site and bingo.
Thanks Lee!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
List whole structure from changeable source
Hi,
I'm trying to list the whole site structure from a changeable source, but it's currently not returning anything. Can anyone see what's wrong with the following XSLT:
(I'm hard coding the source node id to eliminate that from enquiries!)
Old schema, 4.0.1, by the way.
Thanks all.
Hi Dan,
I'd take a look at the XML for node '4444' ... to check if there are any child <node>s?
The rest of the XSLT looks fine to me.
Cheers, Lee.
Ah, that was a weird one. Definitely nodes under 4444, and I tried other nodes too, but nothing. Republished the whole site and bingo.
Thanks Lee!
is working on a reply...