Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pass a variable to a Filter by Label macro

Rhys Gottwald
Contributor
August 4, 2026

I'm looking for a way to create a page that holds two “filter by label” macros, with the label passed to the macros via a page level variable.

What I'm trying to achieve is to display two based on a label but without creating a separate page for each label. Ideally, a single page would be controlled by one filter setting and update the rest of the content accordingly.

Is there anyway to achieve this?

3 answers

1 vote
Martin Runge
Community Champion
August 4, 2026

Hi @Rhys Gottwald

Short answer: this is not possible as far as I know with the native Filter by Label (Content by Label) macro on its own. Its label field holds static text or a CQL query, so it cannot read a page-level variable and refresh both macros from a single control.

If you are open to Marketplace apps, there are some out there. But if it must stay fully native, a lightweight custom macro built with Forge or Connect can take the label as a parameter and return content by that label. That gives you the single per-page control you are describing, at the cost of a little development effort.

Do you want to keep this native only, or are you happy to add an app?

Cheers, Martin

0 votes
Kris Klima _K15t_
Community Champion
August 6, 2026

Hi @Rhys Gottwald 

If I understand you correctly, what you're describing is 'conditional content' or 'content variants'. 

For example, in my proof-of-concept - https://universal-imports.scrollhelp.site/datasink/Working-version/windows/troubleshooting-common-issues - I have single Confluence page but it contains content that's specific for Mac, Windows, or Linux variants.

It doesn't look like Confluence, but the underlying asset is a single page in Confluence and the selection works in Confluence too. See here: 

2026-08-07_08-21-41.png

I achieved this using K15t's Scroll Content Manager' Variants feature.

And crucially, it is label-based.

Disclaimer: I work for K15t. The article I'm referencing above is from my pre-K15t era.

0 votes
James Gamble
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 Champions.
August 4, 2026

Hola Rhys,

The native Filter by Label macro can use labels or a CQL query configured inside the macro. Still, it can’t read a page-level variable or inherit a shared value that dynamically updates multiple macros. Each macro keeps its own configuration, so there isn’t a native page control that can switch both results together.

Since you’d like to avoid creating a separate page for every label, could you clarify how you expect someone to choose the label? For example, should the label come from the current page’s own label, a dropdown that a viewer changes while reading the page, or a value entered when the page is created from a template?

That distinction is important because using the current page’s label may have a different app-based solution than building an interactive viewer-controlled filter. Confluence Cloud doesn’t natively provide either behavior through the Filter by Label macro alone, but knowing which interaction you need would help narrow down a suitable Marketplace option.

Thanks,

James

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events