Copied to clipboard

Flag this post as spam?

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


  • Alex 18 posts 38 karma points
    Mar 05, 2010 @ 13:11
    Alex
    0

    Simple editor field used in Macro no HTML

    Hello Chaps,

    Bit of a bizzar one - i am useing the following XSLT file to allow for extra content in my 'sidebar';

    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">

    <!-- start writing XSLT -->
    <xsl:if test="$currentPage/data[@alias='sidebarContent'] != ''">
            <xsl:variable name="sidebarContent" select="($currentPage/data[@alias='sidebarContent'])"/>
        <div class="padded greyBG bottomMargin">
    <xsl:value-of select="$currentPage/data [@alias='sidebarContent']"/>
        </div>
    </xsl:if>
    </xsl:template>

    </xsl:stylesheet>

    This works just fine. As i want the user to enter HTML into this area, i used the field-type of 'simple editor' (as i have done throughout the site, because it allows HTML), but it doesnt in this case... it shows all the tags.

    Weird. Am i doing something wrong here? Or is it a simple fix.

    Thanks for your help in advance!

    A.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 05, 2010 @ 13:43
    Dirk De Grave
    0

    Hi Alex,

    Add disable-output-escaping attribute:

    <xsl:value-of select="$currentPage/data [@alias='sidebarContent']" disable-output-escaping="yes"/>

    Cheers,

    /Dirk

  • Alex 18 posts 38 karma points
    Mar 05, 2010 @ 13:53
    Alex
    0

    Works a treat :)

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft