Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Within any Confluence page or blog post, you can embed this Macro with the {} syntax or using the macro editor.

Image RemovedImage Added

Macro parameters

The PocketQuery macro has different parameters that control how database contents are to be presented in the view of the page. Some of these parameters are only available if other parameters are checked.

Image RemovedImage Added

These are the parameters:

  • Query Name: Name of the target query defined by a PocketQuery administrator. All queries available in the current space are provided in a select box.
  • Query Parameters: If the query selected above requires one or more parameters, they can be set here. Several wildcards can be used as parameters (see below).
  • Load macro dynamically: Make the contents of the query load asynchronously in the background (using Ajax). With this checked, the page load won’t be delayed by the loading of the PocketQuery macro. This will be a performance benefit, especially if you have multiple PocketQuery macros on one page.
  • Include reload button: (requires: “Load macro dynamically”) Shows a small reload button in the top right corner by which the contents of the PocketQuery macro will reload. This is especially useful if your database contents change frequently. (See also Section "Dynamic load" below.)
  • Enable dynamic parameters: Enables to pass query parameters in the URL. The syntax for these parameters in the URL is pq_parameterName. If the option “Use change params template” is also checked, the parameter changes will also be reflected in the URL. If additionally, “Load macro dynamically” is checked, the browser history will be used to equally reflect this in the URL. (See also section “Dynamic parameters” below.)
  • Use change params template: (requires: “Load macro dynamically” OR “Enable dynamic parameters”) Shows a form above the result in which the user can dynamically change the query parameters. If “Load macro dynamically” is used the result will change without page reload. Otherwise, the page is reloaded with the appropriate GET parameters.
  • Debug Mode: Shows debug information on the page for error analysis.


For example, if you have a macro for a query with two query parameters min and max, you can open your page like this: <your-confluence-page-url>?pq_min=10&pq_max=50. Note that GET-Parameters override the values you specified in the macro.Image Removed

Note that if you use special characters or wildcards within the parameter value, you need to URL encode them. For example, the wildcard symbol '%' becomes '%25':Image Removed

If you have multiple PocketQuery macros on one page that have a parameter with the same name, the GET parameter will set all these parameter values. This can be a useful feature, but be aware of unwanted name conflicts.


  • Links to the same Confluence page (that includes a PocketQuery macro) using different query parameters to display completely different data.
  • Reload button for refreshing the contents from the database and get a live view.
  • The macro option "Enable change params template" uses dynamic parameters in the background. Of course, it is possible to rebuild, customize and enhance its functionality - see the Templating tutorial for further details.