Umbraco 4.7.0 Macro not rendering when pasted through Richtext Editor

I am using umbraco v4.7.0. I created a macro for Usercontrol.ascx and add it in the usual way and put a tick in the "Use in editor" option.

It displays RTE perfectly, but then when viewing the page it does not load the macro.

I have been searching Google for a long time and cannot find a solution to this problem, also I was on the umbraco forums / errors to see that there are different posts, but I have not found a solution for this yet.

Did I miss something simple here? This worked great in previous versions.

+3
source share
4 answers

Got a response, finally, ........ on the main page of the template:

<umbraco:Item field="bodyContent" runat="server"></umbraco:Item> 

instead of something like

@Model.bodyContent

, (, RTE) ( , bodyContent).

+5

, , , HTML,

<?UMBRACO_MACRO macroAlias="macroNameHere" />

... . :

XSLT (), , - :

<xsl:value-of select="$currentPage/bodyText" />

:

<xsl:value-of select="umbraco.library:Item($currentPage/@id,'bodyText')" />

, bodyText.

, umbraco DIV . DIV, umbraco, , , jQuery, .

+5

,  <form runat="server">

- , !

- :

<form runat="server">
                      <asp:ContentPlaceHolder ID="mainContent" runat="server" />
</form>

.

+1

To use a macro in a Richtext field

you must check the "Use in editor" box under the "Macro Properties" tab.

enter image description here

And in XSLT, when you print the macro value used after

<xsl:value-of select="umbraco.library:Item(@id,'bodyContent')" /> 

to display the macro value.

Instead

<xsl:value-of select="bodyContent" /> 
0
source

All Articles