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:

  1. In the Confluence editor, choose Insert > Other Macros
  2. 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
(spaceKey

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

Wiki markup example

Was this helpful?

Thanks for your feedback!

19 Archived comments

  1. User avatar

    Ondrej

    I am using Confluence 3.1 in which this macro appears to have one optional parameter, spaceKey, which enables to specify the space for which the list of labels should be generated. This should be perhaps included in the above documentation. Currently, it is possible to specify the spaceKey only for one space, but it would be a nice enhancement if the spaceKey can be specified for multiple spaces.

    04 Nov 2010
  2. User avatar

    Anonymous

    I would like to list the labels for all spaces.

    25 Nov 2010
    1. User avatar

      Ondrej

      I have created a New Feature request for this. You can vote for it at http://jira.atlassian.com/browse/CONF-21299

      25 Nov 2010
  3. User avatar

    Anonymous

    Is it possible to limit this to a parent key instead of space key?

    I have a parent page for around 90 Children Pages with different CC Procedures, its very important to separate those form the rest of the Space Labels, any chance of having this done? Or maybe someone can suggest a way around?

    :(

    Mimi

    17 Dec 2010
  4. User avatar

    Anonymous

    This is a very pretty macro! I would like to use it for a glossary. BUT it should not list labels but list the title of pages since every glossary entry will be a separate page. Is there a solution to this?

    Does anybody have experience with using confluence wiki as glossary?

    Thanks in advance!

    Nina

    04 Aug 2011
  5. User avatar

    Anonymous

    This is a pretty neat macro. Am using it as an index.

     

    06 Sep 2012
  6. User avatar

    Anonymous

    Good Macro but it does not work when you click on one of the labels. The url is wrong.

    It says: ....com/label/DES/labelname
    but that does not work.

    What works is:
     ....com/label/labelname

    Why does it add DES in there? Is there a way to fix this?

     

    18 Oct 2012
  7. User avatar

    Anonymous

    Is there a way to limit the list to the page the macro is on?

    To display the page's macros..

    Thanks

    04 Feb 2013
  8. User avatar

    Anonymous

    the macro only displays labels of pages not from attachments, right? I think it would be great if this lists the labels of attachments, too.

    12 Feb 2013
  9. User avatar

    Anonymous

    Yes, it's absolutely critical for my company's use that labels in use on attachments also show up in this!

    08 Aug 2013
  10. User avatar

    Anonymous

    Would it be possible to get an extension of this macro that allows for wildcards?  For example:

    java* 

    And show all pages that have labels beginning with java? 

     

    thanks!

    31 Oct 2013
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      Great idea - you can raise a feature request here.

      31 Oct 2013
  11. User avatar

    Jenn Leaver

    Seconding a question back from 2010 -

    Is there a way to apply this to a specific page rather than an entire space? To clarify, I'd like to add this to a parent page with multiple children pages, displaying the labels associated with those children pages. 

    I don't see an option for this in the macro, but was hoping someone might have run into this scenario before and come up with a way to work around the issue.

    Or Rachel Robins [Atlassian Tech Writer] - do you know if this might be on the radar for a possible enhancement to the macro?

    08 Nov 2013
  12. User avatar

    Anonymous

    I can't get the "excludedLabels" to work. The excluded label(s) still appear in the list. I've tried with a single label and multiple labels. How should you specify multiple labels to exclude?

    17 Jan 2014
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      I have just tried this out in Confluence 5.4.1 and it worked fine for me.  I added five labels to pages in the space (label1, label2, label3, label-4, label_5). In the labels list macro I specified the following in the Excluded labels field:

      These labels did not appear in the list.  label1 and label2 displayed correctly in the list. 

      Hope this helps. 

      19 Jan 2014
  13. User avatar

    Paul LALANNE

    Hi.

    Is there a way to show excerpts in the result page when clicking on a label of the labels list?

    Thanks in advance 

    30 Jun 2014
  14. User avatar

    Andrew Ball

    Could this macro be edited to display the list view in A-Z order as mine appear to be not quite random but only the lower half of the list is in A-Z order which is very strange.

    15 Aug 2014
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      Hi Andrew, I haven't been able to replicate your problem in Confluence 5.5.  Are they out of order within each column (e.g. within the A-B column) or all out of order? 

      18 Aug 2014
  15. User avatar

    Holly Hayes

    I didn't see a response to the request for Label List to include attachments. Any word on that?

    Also, I am getting a label included in the list that I didn't use "file-list". When I click on it, there are no associated pages. Is it possible that it was used at some point prior and was never cleaned up when the last reference was deleted?

    27 Oct 2014
Powered by Confluence and Scroll Viewport