Copied to clipboard

Flag this post as spam?

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


  • Tom 713 posts 952 karma points
    Mar 26, 2011 @ 07:17
    Tom
    0

    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

  • Daniel Bardi 924 posts 2556 karma points
    Mar 26, 2011 @ 07:30
    Daniel Bardi
    1

    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

  • 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