Adding a space watch/unwatch link to pages

Is there some way I can surface a watch/unwatch space link in page content rather than making the user go to Browse -> Advanced?

My first thought, after built-in macros, was the link-to macro but that doesn't seem to have space watch/unwatch as an available target.

It looks like this might be possible via a user macro and velocity but I've never used velocity before and I'm having trouble working out how I'm going to do this.

Any pointers or existing solutions for this?

1 answer

1 accepted

1 vote
Peter Koczan Atlassian Team Nov 20, 2012


I did some quick tests on a 4.3.2 Confluence instance and basically if you go to Space Admin > Layout > Page Layout for example, you can use this code to display a watch icon:

<div class="entity-watching" data-entity-id="$spaceKey" data-entity-type="space">

     <a class="icon icon-stop-watching" title="Stop watching this space">Stop watching this space</a>

     <a class="icon icon-start-watching hidden" title="Start watching this space">Start watching this space</a>

      <span class="icon icon-wait hidden"></span>


I hope this helps,


Thanks Peter. Doesn't quite work as-is for me since I need in in specific pages rather than across the whole space but certainly gets me 90% of the way there. :)

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

1,005 views 23 13
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