How do I limit the Related Labels macro to a specific Space (the current one)?

Charles Lowell Palmer September 19, 2018

Confluence 6.5.2 Data Center

Adding a Related Labels macro to a page, it's pulling in labels from all spaces in our instance (showing a lot of labels that definitely do not exist in this space)

How do I force this macro to limit its scope to the current space?

I tried playing with some of the CQL filters like spacekey or space.key with `=` or `:` but I can't seem to make them work.

2 answers

0 votes
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2018

We ran into a similar issue where we wanted to have a listing of related pages based on labels, but restricted to child pages. I ended up writing a rather complex user macro to accomplish this task, inspired by/derived from this macro:

https://github.com/unidwell/confluence-include-child-pages-macro

0 votes
Shawn C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 20, 2018

Hi Charles, 

Currently, the Related Labels macro displays a list of all labels from every page which has one or more in common with the page it was added on; it is not possible to limit the list to just the Space the Page resides in. 

If you can give me a bit more information about what your use case is with the Related Labels macro, I can create a Feature Request to see if an option to filter by Current Space or List of Spaces could be added.

 

Cheers,

Shawn

scott.esbrandt December 6, 2023

the use case is simply that its helpful to be able to restrict the related labels to a space (generally speaking the "current space") because we have no control over the same label being used in other spaces for content thats not relevant in the current space.  Basically you'll end up sometimes with junk that can otherwise be filtered out by narrowing to a space. Many other macros have similar capability so this one feels like its "missing"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events