When used in a "Richtext editor" property the box where the rendered should be, shows
helloworld
No macro content available for WYSIWYG editing
If I comment out the line "IPublishedContent assigned = Umbraco.AssignedContentItem;" the rendered content shows just fine.
So not a big bug but does anyone know of a solution?
Or maybe another way to get the Node the macro is in, instead of Umbraco.AssignedContentItem? Because I think it is a nice feature to show immediately to the client what wil be shown on the page.
calling Umbraco.AssignedContentItem in macro gives "No macro content available for WYSIWYG editing"
I'm using Umbraco v6.1.6 (Assembly version: 1.0.5021.24867)
I made a small macro(\Views\MacroPartials\helloworld.cshtml) to illustrate the issue:
When used in a "Richtext editor" property the box where the rendered should be, shows
If I comment out the line "IPublishedContent assigned = Umbraco.AssignedContentItem;" the rendered content shows just fine.
So not a big bug but does anyone know of a solution?
Or maybe another way to get the Node the macro is in, instead of Umbraco.AssignedContentItem? Because I think it is a nice feature to show immediately to the client what wil be shown on the page.
Thanks
Teus
Did you try Model.Content? I think that should return the current page in a PartialViewMacro.
Jeroen
Thanks Jeroen. This is indeed the obvious and simple(aargh!!) solution.
Could you please mark a post as the solution if it helped you?
is working on a reply...