Copied to clipboard

Flag this post as spam?

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


  • Iain Galloway 6 posts 75 karma points
    Feb 06, 2017 @ 14:26
    Iain Galloway
    0

    Where to enter XSL code to allow umbraco.library.RenderMacroContent to work its magic

    Hi,

    I've been having problem rendering a macro written in XSLT (which is then referecned in the macro area and ticked to render in editor).

    In the Umbraco CMS I insert macro and the HTML is altered accordingly. However what gets rendered in the browser is not what I want.

    I've been told to use the following two lines of code (< and > tags removed so it can show here)

    xsl:variable name="content" select="$currentPage/data[@alias='bodyText']"/

    xsl:value-of select="umbraco.library:RenderMacroContent($content, $currentPage/@id)" disable-output-escaping="yes

    The question is,: where exactly should these lines sit? I have some XSLT that reads

    xsl:value-of select="." disable-output-escaping="yes" /

    in a separate file that seems to 'sit behind' the page being rendered. So what should this become instead to make things work? Copying those above lines verbatim doesn't seem to have any effect.

    I'm quite a newbie at this (although a seasoned coder in other languages), so all and any help appreicated!

    Cheers Iain

Please Sign in or register to post replies

Write your reply to:

Draft