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.
Hey Paul,
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
$PocketQuery.renderPocketQueryMacro()
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. :)
Best regards,
Sven (Scandio)
Hi Sven, getting the variable into a velocity object would be the difficult part. I will try with what you have suggested and see how I get on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.