Edit Confluence page to display message/info box

banson September 14, 2016

Hi,

I am looking for a way to display a red info macro or custom html at the top of my confluence space pages, and only in cases it's tagged with a specific label.  For example, if a page label includes "techonly" then I want the message box to be displayed and text with something like "Only a technician can assist with this issue"  

I looked a little at the decorator macros and found the #helpicon() but couldn't make it render even while testing.  

Any ideas on how to accomplish?  Good place for info?  

Thanks in advance.

1 answer

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 14, 2016

Well I can't give you an answer, but some suggestions on how to solve this. I would write a user macro that displays  panel macro (or note), if a label is present on the page (fairly straightforward). And I will point you to another answer that should give you a starting point on how to read labels on a page.

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

Now this means the macro has to be added to each page, a bit of pain. But it could be made part of a template when creating a page.

banson March 6, 2017

Thanks Bill! (sorry for the delayed response!)I like the idea of adding the usermacro to the "main" template for the space.  Is there a special way to call it or a specific area to call it, like just after body?  ...a lot going on in there. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events