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

Stan September 6, 2015

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
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 9, 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

1 vote
Guilherme V.
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 7, 2015

Hi there, 

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

Hope this will help you smile.

Cheers

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 9, 2015

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events