Forums

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

Automatic Warning if Label Applied

Neil Arrowsmith
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.
October 25, 2016

I would like to provide users with an easy way of labelling out of date content in our Confluence site, and have a clear message displayed at the top of labelled pages so that other people know to tread carefully.

It's easy enough to have a standard label, and use contentbylabel to hold a list of pages needing attention, but is there some way of automatically including a warning box at the top of pages with that label? Ideally something space-wide.

Thanks in advance

1 answer

1 accepted

0 votes
Answer accepted
Dave "Jazz" Jaskolka
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 14, 2017

Hey Neil,

I'm actually looking into the same thing right now. My plan is to use a macro to show content based on a label (thus conditionally showing a warning box as you mentioned), along with a custom template for all pages in the given space which has the given macro at the top. That's the best I've been able to come up with so far. My ideas are based on these links:

https://confluence.atlassian.com/display/DISC/if-label

https://answers.atlassian.com/questions/23306

I'm working with one of my Confluence admins to see if I can get this wired up. If I have any success, I'll reply to this post and let you know.

Good luck!
Jazz 

Neil Arrowsmith
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.
March 26, 2017

Hi Jazz

Thanks for pointing me at the if-label page. This, and the config options on the Documentation Them, give me exactly what I need (i'm currently on quite an old version of Confluence).

Thanks again,
Neil

tonyw
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 6, 2020

For Confluence 6.13

Follow the comment in the if-label link that contains the macro fix.

Then in the Admin > Layouts > Page Layout: right after the 

<div id="main-content" class="wiki-content">

in the view mode section place:

$helper.renderConfluenceMacro("{if-label:label=+searching_label}{warning:title=My Warning}{warning}{if-label}"}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events