Hi again guys, I'm running 4.5.2 and have a simple macro, which is basically an asp.net user control that has <div>hello world</div> as its content. I have a macro created in the cms, and it is marked "Use in editor", so I am able to insert the macro into a rich text editor.
However, when I insert the macro into a rich text editor, the content (<div>hello world</div>) doesn't show up in the content. The content before and after the macro show up, but not the macro content.
If you want to render the macro inside the editor in the back office, you need to put a checkmark in the"Render in editor"-checkbox on the macro. Is this what you're trying to achieve or am I totally off here?
Are you getting the message along the lines of "No macro content available .." in place of the text? I think this is a bug introduced around 4.0.4.2 and fixed in 4.6+. Just to be sure though, make sure you have the "Render content in editor" checkbox selected on the macro?
Yes, I am getting the "No macro content available .." message in the editor, but it's not so important that the content renders in the editor. My main problem at this point is that the macro doesn't render out on the actual public-facing page (when the document is rendered out via a template). I have both "use in editor" and "render in editor" check on the macro settings. I am able to insert the macro into the editor. But when the document is published and viewed, the content of the macro does not show up.
macro in rich text editor wont work
Hi again guys, I'm running 4.5.2 and have a simple macro, which is basically an asp.net user control that has <div>hello world</div> as its content. I have a macro created in the cms, and it is marked "Use in editor", so I am able to insert the macro into a rich text editor.
However, when I insert the macro into a rich text editor, the content (<div>hello world</div>) doesn't show up in the content. The content before and after the macro show up, but not the macro content.
What might I be missing or doing wrong?
Hi Rafe
If you want to render the macro inside the editor in the back office, you need to put a checkmark in the"Render in editor"-checkbox on the macro. Is this what you're trying to achieve or am I totally off here?
/Kim A
Hi Rafe,
Are you getting the message along the lines of "No macro content available .." in place of the text? I think this is a bug introduced around 4.0.4.2 and fixed in 4.6+. Just to be sure though, make sure you have the "Render content in editor" checkbox selected on the macro?
-Tom
Yes, I am getting the "No macro content available .." message in the editor, but it's not so important that the content renders in the editor. My main problem at this point is that the macro doesn't render out on the actual public-facing page (when the document is rendered out via a template). I have both "use in editor" and "render in editor" check on the macro settings. I am able to insert the macro into the editor. But when the document is published and viewed, the content of the macro does not show up.
How are you outputting the RTE content to your template? Via an umbraco:Item tag in the template or are you calling it with XSLT?
The RTE content gets injected into a macro that is in the template.
So essentially there is a NewsItem macro that has this:
<%# DataItem.GetProperty("content").Value %>
Here DataItem is the current Node object. And the "content" property is the RTE.
I think you'll need to use the umbraco.library:RenderMacroContent(content, pageId) function to get the macro to render from within another macro.
Something like this (?):
Related thread - http://our.umbraco.org/forum/developers/extending-umbraco/10307-Rendering-Macro-Content-via-User-Controls
-Tom
THAT WORKED! Thanks so much Tom!
is working on a reply...