Copied to clipboard

Flag this post as spam?

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


  • bev0 39 posts 59 karma points
    Dec 08, 2010 @ 01:41
    bev0
    0

    RenderMacroContent in umbraco 4.5

    i am using umbraco 4.5

    i am trying to use an umbraco.library.RenderMacroContent("the_macro", pageid) inline (inside a template)

    it used to work in umbraco 4.0 but ever since we moved to 4.5, it stopped working. if anyone out there has tried and has success with this, please give me an example or advice or something so i can move past this.

    this is the actual line of code that stop working:

    lImgUri umbraco.library.RenderMacroContent("<umbraco:Macro Alias="""" macroAlias=""FilmMediaImage"" runat=""server""></umbraco:Macro>"lPageId)

    please help and thank you in advance!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 18, 2010 @ 18:32
    Jan Skovgaard
    0

    Hi bev0

    The macro content you are trying to render is coming from a rich text field, right?

    If so I think this is a more clean approach.

    <xsl:variable name="content" select="$currentPage/bodyText" />

    <xsl:value-of select="umbraco.library:RenderMacrocontent($content,$currentPage/@id)" />

    Are you also sure that the content from the macro is in the correct XML format? (Remember that the XML schema has changed in umbraco 4.5.x)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft