Is there a way to add a Watch button on a page?

This has been asked before, but the answer wasn't complete. I am trying to add a watch button to a page. I have this with the Theme Builder plugin, but the code is broken in 4.3.7 when you use special characters in the URL. Every time you click the link, it returns you to a "page not found" because it doesn't properly escape the special character in the URL.

I need a workaround for this, because we heavily use special characters, and need to allow users to watch pages.

I think I can use the CLI macro to add the page, but is there a way to create a toggle button so the user can use the same button to watch/unwatch. Or maybe this can be done with a report table with one line with the buttons to watch/unwatch and another line that says "You are currently watching/not watching this page."

Any ideas would be greatly appreciated.

1 answer

You could do something like this in a user macro:

<div class="entity-watching" data-entity-id="$content.getId()" data-entity-type="page"><a class="icon icon-stop-watching" title="Stop watching this space">Stop watching this page</a><a class="icon icon-start-watching hidden" title="Start watching this page">Start watching this page</a><span class="icon icon-wait hidden"></span></div>

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,289 views 25 10
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