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
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

867 views 2 13
Read article

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