12 Days of Confluence Elements: Day 11 - List by Label macro
The List by Label macro is used to display lists of pages, blog posts or attachments that have particular labels. Note that this macro’s name was recently changed from “Content by Label”.
When would you use List by Label macro?
It's great for collecting related pages together and filtering out content that you don't want to see.
For example, you could use this macro to display a list of all pages that have the label 'feature-shipped' and include the word 'Blueprint', or to list any pages with the label 'meeting-notes' that you've been mentioned in.
Here's how the macro looks on your page:
Where is this used in our instance?
Many articles include the List by Label macro to drive users to related content. Our configuration ranges from displaying all content with a selected label to displaying only 5 articles with a link to additional related content. You can see it in action on Graduation & Commencement, and this macro can be used on any page where it makes sense to provide additional related content.
Use the List by Label macro
To add the List by Label macro:
When editing, select Insert from the toolbar
Find the macro by name and select it
Configure it as needed
You can also type / on the page to bring up the same list you'd see by selecting from the toolbar. Continue typing the name of the macro to filter the list.
To edit the List by Label macro:
Select the macro placeholder.
Select the Edit icon to open the configuration panel.
Configure the parameters. Your changes are saved as you go.
Resume editing the page, and the panel closes.
You can also select the centered , medium-width , and full-width icons to adjust the width of some macros. Select the trashcan iconto remove the macro.
CQL filters
CQL (Confluence Query Language) is a query language developed for Confluence, which you can use in some macros and the Confluence search. Confluence search and CQL-powered macros allow you to add filters to build up a search query, adding as many filters as you need to narrow down the search results. To add a filter to your query, select the Add a filter link.
Macro display options