Add a watch link on a page for a different page in a different space

Hi,

I want to add a link/button on a page that, when clicked, makes the user watch a certain page in a certain space (both different from the page where the link is on). How can I accomplish this?

 

Some background: we are running into the issue that using the "include page" macro to include a page breaks the watch functionality. The user has to watch the source page instead of the actual page, which is very confusing for end users. If there is a better solution than a watch link/button I'm all ears!

2 answers

1 vote

Hi there, 

You could try using a third-party plugin for watching the page.

Hope this will help you smile.

Cheers

Davin Studer Community Champion Sep 09, 2015

I don't think that has what he is looking for.

0 vote
Davin Studer Community Champion Sep 09, 2015

You could probably use the josn-rpc api to add the watch. Another option would be to use the addpagenotificationaction.ajax page and POST the id of the real page ... this is how Confluence adds the watch itself. The form data to post is pageId(page id of the real page) and it looks like it also passes atl_token (the user's token ... you can get this via JavaScript using AJS.params.atlToken;). If you know javascript it shouldn't be too hard to use jQuery to do it using Atlassian's namespaced version of jQuery AJS.$

addpagenotificationaction.ajax URL
http://wiki/users/addpagenotificationajax.action

JSON-RPC url
http://wiki/rpc/json-rpc/confluenceservice-v2/watchPage

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 ...

902 views 23 12
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