I'm trying to render a contactform from my webpage on my mobile page - I've triede several examples found on google - but no luck so far... :-|
I can easily render any content from the RTE(bodyText) but CANNOT render a macro...
If I runs the @Html.Raw(item.bodyText.ToString()) property (or just plain @item.bodyText) I simply gets the macro tag: "<!--?UMBRACO_MACRO macroAlias="ContactForm" /-->"
If I runs the @umbraco.library.RenderMacroContent(item.GetProperty("bodyText").Value, item.Id) I gets this error: Error generating macroContent: 'System.Web.HttpException (0x80004005): HtmlForm cannot render without a reference to the Page instance. Make sure your form has been added to the control tree
A simple <umbraco:Item field="bodyText" runat="server" /> renders the macro the same macro on another page
Render macro through RTE keeps failing
I'm trying to render a contactform from my webpage on my mobile page - I've triede several examples found on google - but no luck so far... :-|
I can easily render any content from the RTE(bodyText) but CANNOT render a macro...
If I runs the @Html.Raw(item.bodyText.ToString()) property (or just plain @item.bodyText) I simply gets the macro tag: "<!--?UMBRACO_MACRO macroAlias="ContactForm" /-->"
If I runs the @umbraco.library.RenderMacroContent(item.GetProperty("bodyText").Value, item.Id) I gets this error: Error generating macroContent: 'System.Web.HttpException (0x80004005): HtmlForm cannot render without a reference to the Page instance. Make sure your form has been added to the control tree
A simple <umbraco:Item field="bodyText" runat="server" /> renders the macro the same macro on another page
try changing item.Id into Model.Id
Like this? @umbraco.library.RenderMacroContent(item.GetProperty("bodyText").Value, Model.Id) ? - allready tried that with no luck either... ~:]
is working on a reply...