Content by Label Macro

Add a Content by Label macro to your page to display a list of pages, blog posts or attachments that have particular labels.  

This macro is great for for collecting related pages together and filtering out content that you don't want to see. You could:

  • list of all pages that have the label 'feature-shipped' and include the word 'Blueprint'
  • list any pages with the label 'meeting-notes' that you've been mentioned in.

On this page:

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:

  1. Unable to render {include} The included page could not be found.
  2. Choose Content by Label from the Confluence content category.
  3. Enter the labels you want to use as the basis for your query.
  4. Add additional filters to further narrow your query. These filters use CQL.
  5. Choose Show to change the macro parameters. These are optional. 
  6. 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

Unable to render {include} The included page could not be found.

Change the macro parameters

Error rendering macro 'excerpt-include'

User 'null' does not have permission to view the page.

Here's a list of the parameters available in this macro. 

ParameterDefaultDescription
Sort byModified

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 sortFalseSort the list descending instead of ascending (Z - A, earliest - latest)
Maximum number of pages15Limit the number of items to include in the list. This can be any value up to 500 pages.
List titleBlankInclude an optional heading for the macro
Show labels for each pageTrueShow or hide the labels applied to each item
Show space name for each pageTrueShow or hide the space name for each item
Display excerptsFalse

Allows you to include a short excerpt under each page in the list. Choose between:

  • None - no excerpt will be displayed.
  • Simple - displays the first line of text contained in an Excerpt macro any of the returned pages. If there is not an Excerpt macro on the page, nothing will be shown.
  • Rich content - displays the contents of an Excerpt macro, or if there is not an Excerpt macro on the page, the first part of the page content, as formatted text, including images and some macros.
Exclude current pageFalseAllows 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.

Error rendering macro 'excerpt-include'

User 'null' does not have permission to view the page.

Other ways to add this macro

Add this macro as you type

Unable to render {include} The included page could not be found.

Add this macro using wiki markup

Unable to render {include} The included page could not be found.

Last modified on May 20, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.