Copied to clipboard

Flag this post as spam?

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


  • Richard Wimbridge 6 posts 76 karma points
    Aug 16, 2017 @ 16:13
    Richard Wimbridge
    0

    Cant select node by id using a parameter in xslt

    I am trying to select a page field using umbraco.library:GetXmlNodeById. If i type an id e.g. 1454 it works, if i try to pass a macro param say $myId to it nothing displays on my page.

      <xsl:param name="scamId" select="/macro/scamId"/>
    
    <xsl:value-of select="$scamId"/>
    
    <xsl:value-of select="umbraco.library:GetXmlNodeById(1454)/scamHeading"/>
    
        <xsl:value-of select="umbraco.library:GetXmlNodeById($scamId)/scamBody"/>
    

    The top statement returns the scamHeading

    The bottom statement doesn't return anything

    The value of scam id does return the number i just want to use the number from the variable as the parameter for GetXmlNodeById($scamId).

Please Sign in or register to post replies

Write your reply to:

Draft