I am using the Archetype package (http://imulus.github.io/Archetype/). It has been working great, I have a data type built that uses the RTE for repeating content. I'm trying to throw macros into this content, but I cannot get the macros to render. I was initially using @Html.Raw() to render the content, but this will not output the macros. Here in the code I'm using in my template so far to render the content:
So the key is that you need to have "render macro in rich text editor" checked. This works for most of them, but some macros this might cause an issue (I have a wistia embed macro that this doesn't work for).
That's odd, but good to know it's not a problem for you. Perhaps it was the upgrade that made my install act funky. I tried unchecking to see if it works and no go. At least there is a halfway solution!
That's odd, but good to know it's not a problem for you. Perhaps it was the upgrade that made my install act funky. I tried unchecking to see if it works and no go. At least there is a halfway solution!
Archetype Rich Text Editor (RTE) Macro Rendering
I am using the Archetype package (http://imulus.github.io/Archetype/). It has been working great, I have a data type built that uses the RTE for repeating content. I'm trying to throw macros into this content, but I cannot get the macros to render. I was initially using @Html.Raw() to render the content, but this will not output the macros. Here in the code I'm using in my template so far to render the content:
The output I get when using this is rendered html, but not a rendered macro - only the placeholder that is in the RTE. Ex:
Only way I currently know how to do this is like this:
Obviously change the p
I wonder if there is a newer version although it's not marked as obsolete. Seems like something that should be in TemplateUtilities :-)
I wish that worked :-\, I get the same result and the macro is not rendered.
Agreed, it would be fantastic to be in TemplateUtilities! :)
Hi Kelsee,
I've just given this a try and it seems to work without even needing to use RenderMacroContent
Just like this:
I've tested with v7.0.4 and v7.1.0RC and Archetype v0.5.1, what version are you using?
Jeavon
Hi Jeavon,
Thanks for your reply. I'm using v7.0.4 and rchetype Archetype 0.5.1-alpha.
I suppose the only thing I can think of is that I upgraded umbraco from versino 7.0.0. Perhaps something got lost?
What type of macro are you trying to render, Usercontrol, Scripting file, Macro Partial View etc....?
A simple Macro Partial View. I've tried a couple different ones - some with parameters some without.
Strange, this is what I have in my Archetype RTE:
And Razor is like this:
So the key is that you need to have "render macro in rich text editor" checked. This works for most of them, but some macros this might cause an issue (I have a wistia embed macro that this doesn't work for).
Thanks for all the help!
Great it's working! Oddly, I don't have that requirement, seems to work both when checked or not for me....
Maybe just re-saving the Macro has fixed the issue, have you tried unchecking a working one to see if it still works?
That's odd, but good to know it's not a problem for you. Perhaps it was the upgrade that made my install act funky. I tried unchecking to see if it works and no go. At least there is a halfway solution!
That's odd, but good to know it's not a problem for you. Perhaps it was the upgrade that made my install act funky. I tried unchecking to see if it works and no go. At least there is a halfway solution!
I would appreciate if someone can chime in on this. I think its related.
related issue with archetype
It doesn't really seem realted and I can't say that my issue is fully fixed,.. but I added something to your thread that may help
is working on a reply...