Render macro from richtext editor inside partial view
Hej,
Umbraco v6.1.6.
Basically have a solution where based on select via ajax I show partial view.
In that partial view i am trying to render object property, that property is fetched via controller from some specific page - data type - rich text editor - using macros inside that rich text editor, and i cant make them to render properly.
umbraco.NodeFactory.Node node = uQuery.GetNodesByName(NodeName).FirstOrDefault();
// tried some manual regex conversions of current output to correct ones for rendering - kinda works but not always
content = Helper.FixMacrosInContent(content, pageId);
var PageModelSample = new PageModelSample()
{
...
Content = content,
PageId = pageId
};
return PartialView(PageModelSample);
So nothing really to difficult, but ...
Tried all kind of render types and ways : Raw, RenderMacroContent and etc., nothing seems to work as it should.
The problem is not that code itself - it is working ... i made it render both with RenderMacroContent and my custom regex function to parse content, but .. it still does not work as should.
The problem : on ajax load it throws this partial view script error, but if i refresh the page - it works and everything is loaded as should.
It works in editor rendering, it works after page refresh, cache turned off, everything published.
Any ideas ? at least where i could continue looking :)
Render macro from richtext editor inside partial view
Hej,
Umbraco v6.1.6.
Basically have a solution where based on select via ajax I show partial view. In that partial view i am trying to render object property, that property is fetched via controller from some specific page - data type - rich text editor - using macros inside that rich text editor, and i cant make them to render properly.
Simplified code:
Partial view :
Controller :
Macro :
On ajax load :
So nothing really to difficult, but ... Tried all kind of render types and ways : Raw, RenderMacroContent and etc., nothing seems to work as it should. The problem is not that code itself - it is working ... i made it render both with RenderMacroContent and my custom regex function to parse content, but .. it still does not work as should.
The problem : on ajax load it throws this partial view script error, but if i refresh the page - it works and everything is loaded as should.
It works in editor rendering, it works after page refresh, cache turned off, everything published.
Any ideas ? at least where i could continue looking :)
Thanks.
is working on a reply...