It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

there is a macro that receives the id of a page and display the button to "add to favorites" and to "watch" the page???

I need to add to a list import with "html-include" macro, where I have the page ID to display... The idea is that each row in this list have the button to add/remove to favourite and add/remove from watchlist... I attached a example of the list... Please help...

thnx.

3 answers

there's any way to create a list of the pages from a space, with the add/remove buttons but directly from confluence????

that's more easy I think...

please, help !!!

I'd like answer to this too. You can automatically generate a link that will do some of the work:

## @noparams

<a href="/pages/addpagenotification.action?pageId=$content.getIdAsString()">Add Watcher</a>

Of course, this will only work for the page you are currently on. You'd probably have to manually update the code with each page ID.

Anyway, this fails for two reasons:

  1. There's no security token present and I don't know how to generate these.
  2. It doesn't act like a toggle. So the same link won't 'unset' it if the page is already watched.

So yeah, I'd like to know how to do this too.

Hi Bryan,

For creating the list of pages I'd recommend using the Reporting plugin to do this. It could easily generate a table for you, with columns for page name, creator, last modified date etc. You could also have columns for specific actions you want to perform on each page. I've used this technique quite often, sometimes to offer a link for editing the page, or remove it, without having to go into the page itself. I'll post an example for you tomorrow.

Your desired actions are different though - to make the page a favourite or watch it. That should be do-able too. The Reporting plugin will give you the page id for each page in the table (content:id) and you can embed that in a suitable link. Firebug is useful for understanding what that link should be.

Here's an example in the old Atlassian forum where we inserted a page id into the normal Confluence URL for creating a comment. (we also inserted specific text).

http://forums.atlassian.com/message.jspa?messageID=257362632

Getting the link to act as a toggle may be tricky, but one step at a time!

Here's an example of embedding a page id into a link with the aid of Reporting. The link allows the page to be edited:

{report-table}
{local-reporter:content:children|type=page}{local-reporter}
{report-column:title=Page Name}{report-info:content:title|link=true}{report-column}
{report-column:title=Page Id}{report-info:content:id}{report-column}
{report-column:title=Edit}
{report-link:content:id|prefix=/pages/editpage.action?pageId=}Edit Page{report-link}
{report-column}
{report-column:title=Remove}
{report-link:content:id|prefix=/pages/removepage.action?pageId=}Remove Page{report-link}
{report-column}
{report-empty}No child pages found.{report-empty}
{report-table}

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

3,827 views 15 37
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you