We have pages with a large number of pocketquery macros to display different information. All of the queries take a simple alias relating to the page. Currently we have to enter this alias as a parameter for each individual query.
Is there any way to take a confluence variable and use it as a parameter for the PocketQuery statements. Ideally when using the page template the user should be able to enter the alias once and this is automatically used in all queries.
just letting you know that we have moved our support over to our service desk for PocketQuery.
First you should look and see if wildcards solve your problem.
If this doesn't work you have a second option. So if this "alias" you are talking about is something you can get access to inside a Velocity template (for example the name of the page, or a macro parameter) then you could use
in your template and simply pass the value as a parameter. You could make one big Template, which is responsible for rendering all the other PocketQuery macros. You could then pass this one big Macro a macro parameter of your liking and in the template populate the macro paramter to the other macros.
Have a look at our documentation to see what kind of Velocity objects you can use in your templates and how to use the renderPocketQueryMacro() function.
If you need further help please raise a ticket at our service desk and tell us more about what this alias is supposed to be. :)
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG