Copied to clipboard

Flag this post as spam?

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


  • Magnus Eriksson 122 posts 362 karma points
    Apr 29, 2010 @ 16:36
    Magnus Eriksson
    0

    Render macro in xslt

    How do you get the macro to render when you need to output the content in xslt?

    In a template this works fine:
    <umbraco:Item runat="server" field="bodyText" />

    In a xslt this renders or removes the actual macro tag depending on output-escaping:
    <xsl:value-of select="$currentPage/data[@alias='bodyText']" disable-output-escaping="yes"/>

    How do you get the macro to render in xslt?

    Thanks,
    Magnus

  • Chris Dunn 210 posts 401 karma points
    Apr 29, 2010 @ 17:00
    Chris Dunn
    0

    Magnus,

    I assume the macro is inserted into your Rte body text.  Is the macro a user control or xslt?  As far as I know rendering a usercontrol macro from another macro does not work.

    -Chris

  • Magnus Eriksson 122 posts 362 karma points
    Apr 29, 2010 @ 17:29
    Magnus Eriksson
    0

    Hi Chris,

    Yes, I've inserted the macro (oEmbed/Easy Video) in the RTE/tiny mce, and I'm using a xslt/macro to display the content since I wanted to do some xslt stuff (xsl:if/when etc).. is it maybe possible to use umbraco.library:RenderMacroContent? Or maybe I'll have to go about this another way not using xslt...

    Regards,
    Magnus

  • Chris Dunn 210 posts 401 karma points
    Apr 29, 2010 @ 18:18
    Chris Dunn
    0

    Unfortunately if it's a user control macro, RenderMacroContent won't work.  It has to do with the lifecycle of the page loading.  I would look for another solution.

    -Chris

Please Sign in or register to post replies

Write your reply to:

Draft