The Contentbylabel macro lists content which has been tagged with specific labels.
On this page:
What you need to type |
What you will get |
|---|---|
{contentbylabel:documentation, my:stuff|maxResults=5} |
|
By default, Confluence lists all the labels for each result displayed. In the above example, we have limited the list to 5 results. See the optional parameters below for more information.
To display all pages with the label needs-fixing, use:
{contentbylabel:needs-fixing|showLabels=false|maxResults=99|showSpace=false|key=@self}
|
No |
Parameter |
Default |
Description |
|---|---|---|---|
1 |
key |
all |
Specify a space key to show the results for a particular space. |
2 |
type |
false |
Filter by content type |
3 |
showLabels |
true |
Show or hide labels for results |
4 |
showSpace |
true |
Show or hide spaces for results |
5 |
excerpt |
false |
Show or hide excerpts for results |
6 |
maxResults |
5 |
Specify maximum results to display |
7 |
sort=creation |
recent |
The 'sort' attribute is an optional attribute that allows you to configure how the children are sorted. You can also use the 'reverse' parameter (see below) to optionally reverse the sorting. |
8 |
reverse=true |
false |
If you are using the 'sort' parameter (see above), you can also use the 'reverse' parameter change the sort order. |
9 |
operator |
OR |
The operator to apply to the supplied lists of labels. By default, a page with any of the labels will be listed. By using |
{contentbylabel:dogs,cats|key=PETS}
|
{contentbylabel:dogs,cats|key=@self}
|
{contentbylabel:dogs,cats|key=@all}
|
{contentbylabel:dogs,cats|type=page,blogpost}
|
{contentbylabel:dogs,cats|showLabels=false}
|
{contentbylabel:dogs,cats|showSpace=false}
|
{contentbylabel:dogs,cats|excerpt=true}
|
{contentbylabel:dogs,cats|maxResults=99}
|
{contentbylabel:dogs,cats|sort=title}
|
{contentbylabel:dogs,cats|sort=title|reverse=true}
|
Related Labels Macro
Navmap Macro
Recently Used Labels Macro
Working with Labels Overview
Working with Macros
Take me back to Confluence User Guide