Copied to clipboard

Flag this post as spam?

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


  • arviman 71 posts 92 karma points
    May 15, 2010 @ 01:04
    arviman
    0

    Display the content of a rich text editor type using xslt

    Hi,

    My current page's child nodes has two properties - an image and some text content.

    In my current page I want to iterate through the child nodes, and display the img and text content side by side.

    However, with the code only the img is getting rendered, I'm quite clueless how to display the content of the rich text editor type(the alias is demoTextContent).

    <xsl:for-each select="$currentPage/node">   
            <xsl:if test="string(./data [@alias = 'demoTextPage_Photo']) != ''">       
                <img src="{./data [@alias='demoTextPage_Photo']}"/>       
            </xsl:if>
            <xsl:value-of select="string(./data[@alias='demoTextContent'])" disable-output-escaping="yes"/>
    </xsl:for-each>

    I know it would be easy to display this in the template itself using <umbraco:Item> but I don't know how (if it's possible) to iterate through the current page's child nodes in the template, so forced to do it in XSLT :)

    Thanks.

  • arviman 71 posts 92 karma points
    May 15, 2010 @ 01:16
    arviman
    0

    The above code works. Sorry, consider it solved.

Please Sign in or register to post replies

Write your reply to:

Draft