I created a xslt for displaying some content in a "sidebar" - if I now put some content and a macro with the editor into this sidebar the content is rendered correct but the macro in the old way (just looked into the sourcode). How can i fix this issue so the macro is also rendered for umbraco 4.5.2?
If that is the case you need to use either the GetItem extension or RenderMacro extesion to render the macro, which is inserted into the rich text editor.
I use the code and now the macro is rendered but not in the correct way - i think i am loosing my macro properties. so one property is for example a property called "text" which is the text for the button. if i use the method from Tom i am loosing this information and the name is not filled in.
If i use it in the bodyText all is working ok so i think the macro works fine but not in another XSLT
Old macro parsing on Umbraco 4.5.2?
Hello everybody,
I am using Umbraco 4.5.2 and just put some macro into my content. What Umbraco does is very strange. It uses the old macro statement I think
Here is the code:
<?UMBRACO_MACRO ordertypeclass="order_button"
type="Button" text="test"
macroAlias="OrderingButton" />
If I put the macro in some other content side it works.
So what the problem is exactly,
I created a xslt for displaying some content in a "sidebar" - if I now put some content and a macro with the editor into this sidebar the content is rendered correct but the macro in the old way (just looked into the sourcode). How can i fix this issue so the macro is also rendered for umbraco 4.5.2?
Thanks
Hi Dominik
Do you insert the macro into a rich text editor?
If that is the case you need to use either the GetItem extension or RenderMacro extesion to render the macro, which is inserted into the rich text editor.
Does it make sense?
/Jan
Just to clarify, try using the RenderMacroContent function - this should output the RTE contents as well as rendering any macros inside
Replace yourPropertyAlias with however you are getting the richtext property (ie $currentPage/yourPropertyAlias etc)
-Tom
Do i have to install any plugin to get it working?
Yes i inserted the macro in RichText editor
Hi Dominik
No, you don't need to install anything.
Doesn't the example provided by Tom work for you?
/Jan
I use the code and now the macro is rendered but not in the correct way - i think i am loosing my macro properties.
so one property is for example a property called "text" which is the text for the button. if i use the method from Tom i am loosing this information and the name is not filled in.
If i use it in the bodyText all is working ok so i think the macro works fine but not in another XSLT
Hi Dominik
Could you please provide an example of the XSLT you're trying to render the content of your rich text editor with?
/Jan
Hi Jan,
Here is my xslt
Inside the contentTab1Text there is my other Macro. All is rendered but i am loosing the properties of the macro which is included in contentTab1Text
THis is the code which is generated if i not render the macro:
<?UMBRACO_MACRO ordertypeclass="order_button_gene"
text="Order Now" type="Button"
macroAlias="GSYOrderingButton" />
If I render it in the way i posted above the properties are lost
is working on a reply...