Content by Label Macro
Screenshot: The Content by Label macro showing all pages that contain the label "printer".
For general information about using labels in Confluence, see Add, Remove and Search for Labels.
Add this macro to your page
To add the Content by Label macro to a page:
- Unable to render {include} The included page could not be found.
- Choose Content by Label from the Confluence content category.
- Enter the labels you want to use as the basis for your query.
- Add additional filters to further narrow your query. These filters use CQL.
- Choose Show to change the macro parameters. These are optional.
- Choose Insert.
You can then publish your page to see the macro in action.
Screenshot: Using CQL to search for content with a particular label in two spaces in the Content by Label macro
CQL filters
Change the macro parameters
Here's a list of the parameters available in this macro.
Parameter | Default | Description |
---|---|---|
Sort by | Modified | Sort the list by title, the date it was created, or the date it was last modified. If you don't select an option, CQL default ordering by relevancy is used. |
Reverse sort | False | Sort the list descending instead of ascending (Z - A, earliest - latest) |
Maximum number of pages | 15 | Limit the number of items to include in the list. This can be any value up to 500 pages. |
List title | Blank | Include an optional heading for the macro |
Show labels for each page | True | Show or hide the labels applied to each item |
Show space name for each page | True | Show or hide the space name for each item |
Display excerpts | False | Allows you to include a short excerpt under each page in the list. Choose between:
|
Exclude current page | False | Allows you to exclude the page the macro appears on from the list. This is useful when the current page contains the same labels as the pages you want to include in the list. |