Do you know how to programically force macro to execute?
I mean xhtml macro from com.atlassian.confluence.macro.Macro
Thanks!
Marcin
Community moderators have prevented the ability to post new answers.
How are you setting up the macro in that template?
I don't think you can force it to execute, but if you set it up correctly in the editor I think confluence will execute by itself once anyone opens it.
You can set it up in the template like so I think:
<p> <ac:macro ac:name="macroname"> <ac:parameter ac:name="ag1"><at:var at:name="arg1var" /></ac:parameter> <ac:parameter ac:name="arg2"><at:var at:name="arg2var" /></ac:parameter> </ac:macro> </p>
Hi Marcin,
What does the execute() method of your macro return? Is it returning what you are expecting to be seen as the macro output?
Secondly, are you using user templates to render your macro and then using "Create from template" option? If not you can try creating a user template in your space and ask your macro use that template from that space. But again, before all this , you have to make sure that the execute method returns what you want your macro to return and then things can be taken further.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The case is that I store a macro in template and then I am programically creating page from this template. It occurs that macro is not executing when new page is creating. Is there any way to force it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please give more context with example?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.