I'd like to output a macro from inside a razor script. If I use the macro declarations then I end up opening and closing Razor macro tags all over the page to allow for the other macro tags. I've tried the following but haven't got it to work so far.
@{ var faceBookMacro = new umbraco.presentation.templateControls.Macro(){Alias = "FacebookFeed"}; faceBookMacro.MacroAttributes.Add("FacebookId", "13412341"); faceBookMacro.RenderControl(new HtmlTextWriter(Response.Output)); }
Any ideas? It'd be awesome if we had some simple razor syntax for doing this.
Output macro in Razor script
I'd like to output a macro from inside a razor script. If I use the macro declarations then I end up opening and closing Razor macro tags all over the page to allow for the other macro tags. I've tried the following but haven't got it to work so far.
Any ideas? It'd be awesome if we had some simple razor syntax for doing this.
Can you try something like this:
is working on a reply...