Confluence 5.0.1 Download Version
Summary: Two different User Macros on a single page. Is it possible to - dynamically - pass a user entered param from one macro to another?
Detail:
Thank you for your consideration --- I promise to provide any additional clarification and am open to any other ideas.
Community moderators have prevented the ability to post new answers.
If the second user macro just executed client side/javascript based on the HTML in the first, then what you want could be achieved. It all depends on what these user macros actually do.
Hi David,
Thanks so much for your guidance. Please forgive me, my technical skills are definitely lacking. Here's my initial attempt to answer your thoughtful proposition. Please let me know if I am leaving anything out and if you believe my goal could be achieved via some other approach.
Using the Macro, I can create the Header that fits our needs perfectly; but I've no approach for the Footer.
Am I going about this in the wrong way?
Thanks for your consideration!
Sincerely, CR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tyler,
This is not easily achieved in Confluence since the parameters in a macro are not "dynamic". The entered values for a macro parameter are saved in the page just like any other page content, so Confluence does not have any mechanism to change their value automatically based on the state of the other content in the page.
If you really needed this to work, your User Macro #2 would need to retrieve the whole content of the page and parse it manually, looking for User Macro #1 and reading in the stored parameter value. It would be possible to do this using the Confluence PageManager, but it would be quite a bit of coding and I'm not sure how well it would perform.
Joe.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joseph,
Thank you so much for your insights and guidance. Your approach - via page parse - gives me hope that I can make this work.
Thanks again, take care, CR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm also interested in the dynamic values of a drop-down box in macro params, so any answer to this s far ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As another idea / question: would it be possible to set a User Macro param to some value on the Confluence page?
Example: I have a Confluence page with a drop down box containing three choices (A, B, C). Is is possible to have a User Macro render based on the choice made from the drop down box (A, B, C)?
Thanks for your consideration.
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.