Related Labels Macro

Add the Related Labels macro to give people a way to navigate to related content in your site. 

It works by finding labels that pages have in common. It takes the label used on the current page, looks for other pages that use this label, and then lists any other labels that are found on those pages. 

This macro is great for:

  • Knowledge base articles
  • Process and procedure documentation. 

Basically any situation where you want a map of related pages in your site. The list updates automatically, as labels are added and removed from pages over time.

On this page:

Screenshot: the Related Labels macro guiding people to related articles in a knowledge base. 

Add this macro to your page

To add the Related Labels macro to a page:

  1. From the editor toolbar, select Insert , then Other Macros.
  2. Choose Related Labels from the Confluence content category.
  3. Enter specific labels the macros should look for, or leave blank to use any labels on the page.
  4. Choose Insert

You can then publish your page to see the macro in action. 

Screenshot: configuring the Related Labels macro in the macro browser.

Change the macro parameters

Macro parameters are used to change the behavior of a macro.

To change the macro parameters:

  1. In the editor, click the macro placeholder and select Edit.
  2. Update the parameters as required then select Insert.

Here's a list of the parameters available in this macro. 

Parameter

Default

Description

Restrict to these Labels
(labels

none

Specify the labels for which you want to view related labels. For example, documentation,how-to.

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).

Other ways to add this macro

Add this macro as you type

Type followed by the start of the macro name, to see a list of macros. 

Add this macro using wiki markup

This is useful when you want to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.

Macro name: related-labels

Macro body: None.

{related-labels:labels=choc,cake}
Last modified on Oct 3, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.