Copied to clipboard

Flag this post as spam?

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


  • shine 43 posts 83 karma points
    May 22, 2013 @ 07:56
    shine
    0

    xslt did not generate any output

    here is my xslt code which i want to check with particular page id but this xslt no generate any output

    <xsl:template match="/">
        <!-- start writing XSLT -->
    <xsl:for-each select="$currentPage/ancestor-or-self::SiteRoot/SEGWThreeTextCol/ImageGallery2">
        <xsl:for-each select="umbraco.library:GetXmlNodeById(1214)/*[@isDoc]">
       
        {"url":"<xsl:value-of select="imageGallery2" />","width":"333","height":"249"}
        <xsl:if test="position() != last()">,</xsl:if>
           
        </xsl:for-each>
       
        </xsl:for-each>
    </xsl:template>

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    May 22, 2013 @ 12:23
    Alex Skrypnyk
    0

    Hi Shine,

    You don't need to do ancestor search.

    Try to use such code:

    <xsl:template match="/">
        <!-- start writing XSLT -->
        <xsl:for-each select="umbraco.library:GetXmlNodeById(1214)/*[@isDoc]">
        
        {"url":"<xsl:value-of select="imageGallery2" />","width":"333","height":"249"}
        <xsl:if test="position() != last()">,</xsl:if>
            
        </xsl:for-each>
    </xsl:template>

Please Sign in or register to post replies

Write your reply to:

Draft