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 Guys,
Im trying to use call-template and passing in the current node of a for-each loop..
when i do this i then can't access the children of that node: i.e.
<xsl:if test="name() = 'applications'"> <xsl:call-template name="renderApplicationsDrop"> <xsl:with-param name="applicationsNode" select="."/> </xsl:call-template> </xsl:if>
<xsl:template name="renderApplicationsDrop"> <xsl:param name="applicationsNode"/> <div class="dropdown_3columns"> <xsl:for-each select="$applicationsNode/Application"> <h3><xsl:value-of select="./@nodeName"/></h3> </xsl:for-each> </div> </xsl:template>
When trying to output the param using copy of or iterate over its' child nodes doesn't work.. it's almost like it's not passing in the entire node set.. Cheers, Tom
Is applicationsNode a nodeset or an id?
If it's an id then use umbraco.library:GetXmlNodeById(applicationsNode)
If it's a variable then preface it with a $.
Show how you are getting applicationNode
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
call-template pass node and child nodes
Hi Guys,
Im trying to use call-template and passing in the current node of a for-each loop..
when i do this i then can't access the children of that node: i.e.
<xsl:if test="name() = 'applications'">
<xsl:call-template name="renderApplicationsDrop">
<xsl:with-param name="applicationsNode" select="."/>
</xsl:call-template>
</xsl:if>
<xsl:template name="renderApplicationsDrop">
<xsl:param name="applicationsNode"/>
<div class="dropdown_3columns">
<xsl:for-each select="$applicationsNode/Application">
<h3><xsl:value-of select="./@nodeName"/></h3>
</xsl:for-each>
</div>
</xsl:template>
When trying to output the param using copy of or iterate over its' child nodes doesn't work.. it's almost like it's not passing in the entire node set.. Cheers, Tom
Is applicationsNode a nodeset or an id?
If it's an id then use umbraco.library:GetXmlNodeById(applicationsNode)
If it's a variable then preface it with a $.
Show how you are getting applicationNode
is working on a reply...