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 5908 posts 22603 karma points MVP 4x 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>

  • 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