I've always had to either check the bodytext to see if any of the content from my macro is present or check for other environemntal things (check if current node has children etc) to achieve this. I don't think there is a way to detect directly if a macro has been used - I'd love to know if there is.
It's nasty but you can sneak in a class or something in the html that is only specific to that macro :/ then if the bodytext contains it you know the macro is there!
Use partial when Macro is chosen in RTE
I have made a macro partial view, which can be selected multiple times inside the RTE.
The macro needs scripts, css and another partial. Is it possible to render these scripts, css etc only when the macro is created in the RTE.
something like this?
Hello,
I've always had to either check the bodytext to see if any of the content from my macro is present or check for other environemntal things (check if current node has children etc) to achieve this. I don't think there is a way to detect directly if a macro has been used - I'd love to know if there is.
Sorry, this was posted in the wrong topic ;)
How do you check the bodytext if there is a macro?
It's nasty but you can sneak in a class or something in the html that is only specific to that macro :/ then if the bodytext contains it you know the macro is there!
Yeah, ok. Thanks, but I'm not going to do that :)
Haha ;) I don't blame you.
is working on a reply...