Example: CQL Function Search all pages that contain a specific label
Note: In ScriptRunner for Confluence Data Center, you can create custom CQL Functions that perform advanced searches for content in Confluence. Although this exact functionality in Cloud does not exist, you can create a custom macro that performs the same way by including code and macro parameters. For more information, check out:
To set up a custom macro that searches all pages that contain a specific label, follow these steps:
You can now use this macro on a Confluence page. When you add the macro to a page, here is what appears:
For this example, we'll search for the documentation label. Here is the result:
Tip: For help with using the macro, check out the Use Macros section of the Macros documentation.