I'm using Confluence with the Scaffolding plugin. I've got a frield called `postcode`, and I can get the value from it using report-info. However, when I try to embed this value inside another macro (in this case, the google maps one, to have an automatic map of the location), it fails. {report-info} returns the value correctly, but the outer macro is printed (so I see the {googlemaps-etc} text on the page), rather than being rendeder.
Can anyone suggest how to do this?
Hi there,
I'm assuming you're trying something like this:
{my-macro:someParam={report-info:data:My Field}}
As you noted, that won't work - it's simply not how Confluence parses macros. There is a workaround however. You can 'inject' values into other macros by using the {report-on:injected=true} macro that comes with the Reporting Plugin. You can also use the {replace-and-render} macro from Adaptavist, but I'll leave that example for others.
To to use {report-on} in this situation, it would be something like this:
*My Parameter Value:* {text-data:My Parameter Value}
{report-on:injected=true}{some-other-macro:theParameter=%data:My Parameter Value%}{report-on}
The '%...%' markup is pasted in before the {some-other-macro} is executed, which should achieve what you're after. Check out the documentation for more details:
http://wiki.customware.net/repository/display/AtlassianPlugins/report-on
http://wiki.customware.net/repository/display/AtlassianPlugins/Suppliers
Hope that helps!
Regards,
David Peterson
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.