It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How would I show an include or some controls only if a label is present on that page?

Martin Cleaver Nov 27, 2013

I have some pages, where I denote the type of the page using a label. (e.g. 'marketing')

On each of those labeled / typed pages, I want to show an {include} that brings in extra information .

How would I do this?

We are using Confluence 5.3.1

Thanks, M.

2 answers

1 accepted

0 votes
Answer accepted
Stephen Deutsch Nov 27, 2013

You could use the "if-label" user macro, which can be found here:

NOTE: Ignore step 7.

I haven't tested it myself, but it should work.

Martin Cleaver Nov 27, 2013

Thanks Stephen.

Yes, it worked, with a couple of tweaks! I've posted my replacement version to the page you pointed me to.

Stephen Deutsch Nov 27, 2013

Glad to hear it worked for you, and thanks for the update! I think a lot of people don't consider how powerful the user macro functionality is, and unfortunately many of the user macros on the shared page don't work so well anymore (not to mention that the full documenation for user macros is pretty sparse).

0 votes
Christina Stergiou May 14, 2014


I would love to have the opportunity to use more than one label within the macro. Currently I give out a status macro named Draft to my page whenever there is a draft-label attached to the site.

It would be great If I could add some more statuses like Approved, Reviewed etc. Unfortunately I'm absolutely in lack of experience in order to rewrite my own version of this macro.

Maybe someone can think of a solution and give me a hint?

Best regards!

Stephen Deutsch May 14, 2014

Why not just include multiple versions of the same macro in the page? You can choose any label in the options. If the label doesn't exist, they don't take up any space on the final page anyways. Or perhaps I didn't understand your use case.

Christina Stergiou May 14, 2014

Hey Stephen,

thanks for your fast reply. Of course that is a possible solution BUT I would prefer having less macros (best just one) on my pages. I have some late adopters in the team I currently work for and they can be easily scared away by having too much stuff they do not understand (yet).

I know this is quite a "first world problem" so I guess I will give your suggestion a try and see how it is going with the team. Thank you!

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

874 views 0 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you