Confluence 5.4 has reached end of life
Check out the [latest version] of the documentation
The Content by Label macro displays links to pages, blog posts and attachments that have been tagged with specific labels.
A working example
Below is a working example of the Content by Label macro, displaying content with the label 'LDAP'.
-
External user directories (Bitbucket Data Center 9.6)
-
External user directories (Bitbucket Data Center 9.5)
-
External user directories (Bitbucket Data Center 9.4)
-
-
Using the Content by Label Macro
To add the Content by Label macro to a page:
Speeding up macro entry with autocomplete: To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.
Parameters
Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example
).
Parameter | Default | Description |
---|---|---|
Label(s) | None | Filter by label(s). The macro will display only the content tagged with the label(s) specified here. See also the Operator parameter below.
|
Author(s) | None | Filter by author. The macro will display only the content created or updated by the author(s) specified here. jsmith,jbrown To include content from one user, but exclude from another user: |
Include this Content Type Only | all | Filter by content type. The macro will display only the content of the type specified here. To exclude content of a given content type, put a minus sign (-) immediately in front of that content type. For example: If you specify a content type of Available values:
|
Show Labels for Each Page | true | Show or hide labels in the results. |
Show Space Name for Each Page | true | Show or hide spaces in the results. |
List Title | None | Add a title or heading to the list. |
Maximum Number of Pages | 15 | Limit the maximum number of results to be displayed. Note that the results are sorted first, and then the maximum parameter is applied. |
Display Excerpts | false | Include excerpts from each page listed. Note that you must have defined excerpts on each of those pages, by adding the excerpt macro to the page. Only the first few lines of the excerpt for each page are displayed. |
Restrict to these Spaces | @all | Filter by space. The macro will display only the content which belongs to the space(s) specified here.
Special values:
When specifying a personal space, remember to use the tilde (~) sign in front of the username, such as |
Operator | OR | The operator to apply when matching content against the labels specified in the Label(s) parameter:
|
Sort By | modified | Specify how the results should be sorted.
Note: If this parameter is not specified, the sort order defaults to descending, based on the last modification date (latest first). To change the sort order from ascending to descending, use the Reverse Sort parameter. |
Reverse Sort | false | Select Reverse Sort to change the sort from descending to ascending. Use this parameter in conjunction with the Sort By parameter. Reverse Sort is ignored if Sort By is not specified. |
Code examples
See: