Labels List Macro
The Labels List macro displays a list of all labels within the current space. Each label in the list links to a page that displays all pages in the current space that contain that label.
Using the Labels List macro
To add the Labels List macro to a page:
- In the Confluence editor, choose Insert > Other Macros
- Find and select the required macro
Speeding up macro entry with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Autocomplete for links, files, macros and mentions.
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 name | Required | Default | Parameter description and accepted values |
---|---|---|---|
Restrict to this Space Key | No | Current space | The key of the space whose labels you want to display. |
Excluded label(s)(excludedLabels ) | No | Blank | The labels that you do not want to appear in the list. |
Code examples
The following examples are provided for advanced users who want to inspect or edit the underlying markup for a Confluence page.
Macro name: listlabels
Macro body: None.
Storage format example
<ac:structured-macro ac:name="listlabels">
<ac:parameter ac:name="spaceKey">
<ri:space ri:space-key="DOC"/>
</ac:parameter>
<ac:parameter ac:name="excludedLabels">not-this-label</ac:parameter>
</ac:structured-macro>
Wiki markup example
{listlabels:spaceKey=DOC}