thanks for the reply,.. i was hoping to see the value of my "imageUrl" variable non the less the currentPageID (which is always there), rendered in my browser,.. but it's like the XSLT macro is never run,.. I've tryed to put HTML in it as you have proposed nothing happend )c:
I am using another XSLT to display content of this Richtext editor,.. but when i display the whole node i can see following markup displayed in my browser,..
<?UMBRACO_MACRO imageurl="image goes here"
macroAlias="ImageByUrl" />, but no macro,..
Thanks again,.. I've finally figured what the problem is,. (c:
when i call my "bodyText" page field(which stores data data from richtext editor) with XSLT, for some unknown reason macroes(which were embedded with richtext editor) never get rendered,.. this must be a bug of some sorts !!,..
It just sounds wired to me,..I've tried different approaches to make it work but failed )c:, Is there a way to make macroes work with richtext editor, if they are processed with XSLT instead of .NET. ?
The problem occours because you are trying to render a XSLT-macro through another XSLT-macro. But the above code should work if you are trying to render the macro on the current page ($content, $currentPage/@id).
I didn't think of that when I wrote my first answer. It's less code, and actually the Item-extension makes sure that you can edit the content i canvas-mode as well. That option is normally not possible when rendering the content through XSLT :)
I have run into the problem using this approach (umbraco.library:Item). On occasion the macro shows content that is saved, but not published.
I can get around this by using RenderMacroContent, but in some instances the XSL macro is attempting to render a .Net Macro which does not work in RenderMacrContent, but does work in Item.
How to make a XSLT macro that can be used inside a richtext editor
Hi
I've been trying to make a XSLT macro which can be used inside a richtext editor, and i just can't get it to work.
this is what i've done so fare.
I started out with making a XSLT and macro, and added a "imageUrl" property to the macro under parameters tab,
her's my xslt code
but when i add this macro in my richtext editor and publish,.. nothing,.. nothing gets rendered,..
what am I missing.. ?
Hi,
I noticed that your XSLT template doesn't contain any HTML markup.
Please add some html to your template
Rgds, Ruslan
Hey Ruslan
thanks for the reply,.. i was hoping to see the value of my "imageUrl" variable non the less the currentPageID (which is always there), rendered in my browser,..
but it's like the XSLT macro is never run,.. I've tryed to put HTML in it as you have proposed nothing happend )c:
I am using another XSLT to display content of this Richtext editor,.. but when i display the whole node i can see following markup displayed in my browser,..
<?UMBRACO_MACRO imageurl="image goes here" macroAlias="ImageByUrl" />, but no macro,..
Does anybody know why it is so..
Hi,
Just copied xslt code snippet provided by you to my umbraco installation and all works as expected.
I think you should restart your umbraco installation and recreate your macros
// i was hoping to see the value of my "imageUrl" variable
Do not forgot add corresponding parameter "imageUrl" to your macros
Rgds,Ruslan
Hi Ruslan
Thanks again,.. I've finally figured what the problem is,. (c:
when i call my "bodyText" page field(which stores data data from richtext editor) with XSLT, for some unknown reason macroes(which were embedded with richtext editor) never get rendered,.. this must be a bug of some sorts !!,..
when i call my "bodyText" page field with .Net it works and all is rendered correctly,..
It just sounds wired to me,..I've tried different approaches to make it work but failed )c:, Is there a way to make macroes work with richtext editor, if they are processed with XSLT instead of .NET. ?
Hi there Maanehunden
Maybe you can try out the RenderMacroContent-extension like this:
The problem occours because you are trying to render a XSLT-macro through another XSLT-macro. But the above code should work if you are trying to render the macro on the current page ($content, $currentPage/@id).
/Kim A
Howdy Kim,.
Thanx that is just Awesome,.. that is it,.. that did the trick,..
Glad it worked out for you.
Another approach is to use the undocumented Item-extension like this:
I didn't think of that when I wrote my first answer. It's less code, and actually the Item-extension makes sure that you can edit the content i canvas-mode as well. That option is normally not possible when rendering the content through XSLT :)
/Kim A
I have run into the problem using this approach (umbraco.library:Item). On occasion the macro shows content that is saved, but not published.
I can get around this by using RenderMacroContent, but in some instances the XSL macro is attempting to render a .Net Macro which does not work in RenderMacrContent, but does work in Item.
It worked like a charm to,.. (c: thnx for sharing.
/maanehunden
is working on a reply...