The Content by Label macro lists content which has been tagged with specific labels.
On this page:
To insert the content by label macro into a page using the Macro Browser,
|
Once you've found the content by label macro, click 'insert' to add it to your page. |
To display all pages with the label needs-fixing, use:
{contentbylabel:label=needs-fixing|showLabels=false|showSpace=false|maxResults=99|space=@self}
|
Below is a working example of the 'Content by Label' macro. In the example, we have restricted the display to 5 results. By default, Confluence lists all the labels for each result displayed. See the optional parameters below for more information.
What you need to type |
What you will get |
|---|---|
{contentbylabel:label=documentation|maxResults=5} |
|
Parameter |
Default |
Description |
|---|---|---|
( |
None |
Filter the results by author. The macro will display only the pages etc which are written or updated by the author(s) you specify here.
|
Label(s) |
None |
This parameter is required.
|
Maximum Number of Pages |
15 |
Specify the maximum number of results to be displayed. Note that the results are sorted first, and then the maximum parameter is applied. |
( |
OR |
The operator to apply to the supplied lists of labels. By default, a page with any of the non-prefixed labels (that is, labels without a plus (+) or minus (-) sign immediately preceding it) will be listed. By using |
Show Labels for Each Page |
true |
Show or hide labels for results. |
Show Space Name for Each Page |
true |
Show or hide spaces for results. |
Reverse Sort |
false |
Use this parameter in conjunction with the |
Sort By |
modified |
Specify how the results should be sorted. To change the sort order from ascending to descending, use the |
Restrict to these Spaces |
@all, i.e. all spaces in your Confluence site. |
This parameter allows you to filter content by space. The macro will display only the pages etc. which belong to the space(s) you specify here.
Special values: |
List Title |
None |
Adds a title or heading to the list. |
Include these Content Types Only |
all |
This parameter allows you to filter content by content type. The macro will display only the content of the type you specify here.
Available values:
|
Display Excerpts |
false |
Displays the first line of excerpts for each page. |
{contentbylabel:label=dogs,cats|space=PETS}
|
{contentbylabel:label=dogs,cats|space=@self}
|
{contentbylabel:label=dogs,cats|space=@all}
|
The code below will show only pages (but not news items or other content types) with the labels 'dogs' or 'cats':
{contentbylabel:label=dogs,cats|type=page}
|
{contentbylabel:label=dogs,cats|showLabels=false}
|
{contentbylabel:label=dogs,cats|showSpace=false}
|
{contentbylabel:label=dogs,cats|excerpt=true}
|
{contentbylabel:label=dogs,cats|max=99}
|
{contentbylabel:label=dogs,cats|sort=modified}
|
{contentbylabel:label=dogs,cats|sort=modified|reverse=true}
|
Related Labels Macro
Navmap Macro
Recently Used Labels Macro
Working with Labels Overview
Working with Macros
Take me back to the Confluence User Guide.