Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to display a watermark as a text in Confluence page?

Siddheshwar mhetre
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.
January 29, 2015

I want to display the space name as a watermark in every child page.

So is it possible by user macro? or any script?

Every page should have the watermark as a space name.

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
Alex Medved _ConfiForms_
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.
January 29, 2015

You can easily do it by customizing page layout for your Confluence space (unless your confluence space uses Documentation theme - in this case the process is a bit different)

Space Tools->Look and Feel->Layout

find Page Layout under Content Layouts and select Create Custom (unless you already are using some custom layout for your pages)

find

#if ($mode == "view")
        <content tag="headsection">
            #webPanelForLocation("atl.confluence.viewpage.header" $action.context)
        </content>
        #if ($space.personal)
            #if ($permissionHelper.canView($action.authenticatedUser, $space.creator))
                ## Deprecated: needed in case main.vmd hasn't been updated
                <content tag="show-personal-sidebar">true</content>
            #end
        #end

and I have added after this, the following

<style>

#watermark
{
 position:fixed;
 bottom:5px;
 right:5px;
 opacity:0.5;
 z-index:99;
 color:black;
}
</style>

<div id="watermark">${spaceKey}</div>

 

In my case the page get's watermarked on right-bottom corner of the screen, but you can play with 

bottom:5px;
 right:5px;

as you wish.

 

The similar approach could be used when creating a user macro, but will require you to put that macro on each page. In this solution you will have it for all the pages in your Confluence space

 

Siddheshwar mhetre
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.
January 30, 2015

Thanks Sash.... Its working fine. Can I write a separate user macro for the same? instead of putting in Page Layout?

Alex Medved _ConfiForms_
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.
January 30, 2015

Sure, this is the code you need to put inside your user macro body and set it as "rendered" <style> #watermark { position:fixed; bottom:5px; right:5px; opacity:0.5; z-index:99; color:black; } </style> <div id="watermark">${spaceKey}</div>

Siddheshwar mhetre
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.
January 30, 2015

Its working gr8.... thanks Sash for answer.... :)

Teresa Hollidge June 2, 2015

We use the documentation theme. Any chance you can provide instructions to add a watermark to all pages in a space using doc theme? Thanks!

TAGS
AUG Leaders

Atlassian Community Events