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:
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!
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
is working on a reply...