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.
Community moderators have prevented the ability to post new answers.
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
Thanks Sash.... Its working fine. Can I write a separate user macro for the same? instead of putting in Page Layout?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Its working gr8.... thanks Sash for answer.... :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.