Copied to clipboard

Flag this post as spam?

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


  • Ben Merrick 12 posts 32 karma points
    Oct 27, 2009 @ 20:29
    Ben Merrick
    0

    Quick XSLT and RichTextEditor question

    I have an XSLT file that iterates through all child nodes that exist on a parnet page.  Each child has a property called "Description" that is a RichTextEditor type.  I wrote up my XSLT to dynamically render each child on the parent page, but the HTML markup in the RichText Editor is displayed as regular text.  I don't want to strip the HTML out (which means I cannot use umbraco.Library.StripHtml), but I want the Html in the RichText Editor to render properly.  Here is the snippet of XSLT that I use to initialize each node:

     

    <xsl:template match="/">
    <!-- For each child node of the current page -->
    <div>
    <xsl:for-each select="$currentPage/node">
    <h6>
    <p><xsl:value-of select="data [@alias='Name']/text()" /></p>
    <p><xsl:value-of select="data [@alias='Title']/text()" /></p>
    </h6>
    <xsl:value-of select="data [@alias='Description']" />
    <xsl:value-of select="data [@alias='Photo']" />
    <hr size="2" />
    <br />
    </xsl:for-each>
    </div>
    </xsl:template>

    Is there anything in the Umbraco Library that can render HTML, or should I set the property data type to something else besides RichText Editor?

  • skiltz 501 posts 701 karma points
    Oct 27, 2009 @ 20:32
  • Ben Merrick 12 posts 32 karma points
    Oct 27, 2009 @ 20:49
    Ben Merrick
    0

    Thank you for the quick reply!  That got it!

Please Sign in or register to post replies

Write your reply to:

Draft