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
    Jun 05, 2010 @ 01:27
    arviman
    0

    Rendering user entered HTML content using a macro

    I have a ticker on a page where the client wants to enter HTML as content of the page. The content belongs to a property called "bc_TickerData" of the home page node(with id 1116). The macro I tried was:

    <xsl:value-of select="umbraco.library:GetXmlNodeById(1116)/data[@alias='bc_TickerData']" disable-output-escaping="yes"/>

    However, this macro only returns the HTML as it is on the page, but i want to render the output of the HTML as part of the page. Is that possible using xslt? For eg. if a user enters <b> Hi </b> the output(as you might expect) is <b> Hi </b> but I want to get Hi

    I believe there is a render-macro function in the library but not sure if that's what's needed.

    Thanks in advance.

  • bob baty-barr 1180 posts 1294 karma points MVP
    Jun 06, 2010 @ 00:13
    bob baty-barr
    0

    what happens if you remove the disable outputescaping part?

  • arviman 71 posts 92 karma points
    Jun 09, 2010 @ 00:06
    arviman
    0

    I get the same output except < have been replaced by &lt; ,etc. ALso there's a <p> tag around the output.

  • Kevin Farrow 46 posts 67 karma points
    Jun 09, 2010 @ 03:31
    Kevin Farrow
    0

    Hi arviman,

    It sounds like you are using a Richtext editor as the data type. Try using a Textbox multiple instead.

    Regards,
    Kevin

  • arviman 71 posts 92 karma points
    Jun 15, 2010 @ 04:13
    arviman
    0

    Thanks Kevin, that's exactly what I ended up doing.

Please Sign in or register to post replies

Write your reply to:

Draft