How to create a watch button on a wiki page?
Asked by Rebecca Sheridan:

Hi,

I'm trying to add the ability for someone to take a simple action on a wiki page (like clicking a button), have their name appear on a list in the wiki page, and then getting a list of the page names where someone is watching the page.

Currently, I'm doing this by having somone "watch" a page, using the contributors macro to show the list of people who are watching the page, and then using the contributors macro on a parent page to show the full list of pages in that space where people are watching and the list of watchers.

This is far from ideal. Once small way to make this better would be to have a "watch" button on the page so that it is easier for people to sign up for watching vs. having to know to go to the menu. Is there a way to add this button?

Even better...am I overlooking a way to implement this some other way? People don't actually need to watch the page, they just need to click something and have their name show up on that page.

Thanks,

Rebecca


Answers:
author: Nick Muldoon
body: G'day Folks,

For those watching this issue or stumbling across it for the first time I welcome you to *try [Better Blogs for Confluence](https://marketplace.atlassian.com/plugins/com.arijea.plugins.betterblogs)*.

Better Blogs for Confluence is a paid add-on that allows Space Administrators to subscribe users and groups to email notifications of new blogs in a space.

At Twitter we needed this feature to ensure every member of our product, design and engineering organisation (\>1,500 people) were notified of new blog posts in the Engineering space. The Engineering Blog enabled VP's to communicate one-to-many and teams to share details of the technology and features they were working on. It didn't make sense to ask every new employee to subscribe to the blog in that space, hence Better Blogs was born.

With Better Blogs you can keep everyone informed, and do so with ease. For those wishing to take advantage of early bird pricing use the promotion code [HHYUWD](https://promo.atlassian.com/HHYUWD) before the end of October 2015.

If you have feedback on the Better Blogs for Confluence add-on contact me via [nick@arijea.com^![](https://jira.atlassian.com/images/icons/mail_small.gif)^](mailto:nick@arijea.com) or +1 415 568 7064.

Regards,  
Nicholas Muldoon  
[Arijea](http://arijea.com/)


author: Nicholas Muldoon
body: [Vikas Sharma of Twitter](https://twitter.com/VikasSharma) implemented this neat user macro for our needs. May be useful for others looking at this issue.

<https://gist.github.com/nmuldoon/c5b8062dc0535394229c>


author: Mark Hrynczak
body: > Even better...am I overlooking a way to implement this some other way? People don't actually need to watch the page, they just need to click something and have their name show up on that page.

This sounds very similar to what the RSVP macro does. Have you looked into it as a possible solution?

You can download it from <https://marketplace.atlassian.com/plugins/com.atlassian.confluence.extra.rsvp>

Cheers,  
Mark


author: SimonS
body: Hi Rebecca,

In order to have someone click something and have their name show up on the page, you'll have to make use of some custom coding, scripts, or REST calls. It's possible but would require a bit of work.

It should be pretty easy to write a script within an HTML macro in order to add someone as a watcher to the page. Try putting this in an HTML macro:

|-------------------------------------------------------------------------------------------------------------------------|
| ``` <script>function watch() {    AJS.$('#page-watch').click();}</script>  <button onclick="watch()">watch</button> ``` |

-Simon

comments: author: Markus Lepper
body: Hi Simon,

just had same questions... used your code: Works great!

Thanks, Markus


Tags: addon-com.arijea.plugins.betterblogs

watch