How can I put a space message (on all pages) to a certain user group in Confluence

I want a certain an internal group to see information on all pages in a space. How do I accomplish that? Can I use Site Layouts and set a certain parameter to make sure that it is only the internal group that sees the information. 



2 answers

1 accepted

May be you can do it by customising the PageLayout

I tried to hack something quickly and it worked...

#set ($userGroups = $userAccessor.getGroupNames($action.authenticatedUser))
#set ($groupToMatch = "confluence-administrators")
#foreach ($group in $userGroups)
  #if($group == $groupToMatch)
    <p>Hello admin!</p>

to put in a PageLayout before body (for non documentation theme spaces)

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

But, the code will also work for Confluence space layouts / site layouts 

0 vote
Davin Studer Community Champion Dec 19, 2014

The Public Annoucement Service add-on can do this. It's free too.

Hi David, Thanks for the answer. The plugin can set an application level message but not on space level which is what I am looking for, but it is an useful plugin!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,927 views 27 12
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you