Choosing links to insert from a menu

Problem: On topic-based pages, I would like to be able to insert hyperlinks to a chosen subset of particular pages. Assume the particular pages all have the "meeting" label on them. Also, you can assume that the pages have names that include the date near the beginning, after some prefix, in a form that is sortable ("Mtg 2011-09-14 bla..."). From a list sorted, with most-recent coming first, limited to maybe 10 items, I would like a check box to indicate I want to insert a link to that page.

My Attempt: I tried to come up with a full solution, but I don't know how to do the linking. My partial solution just displays the list of meeting pages. It uses the reporting plug-in content-reporter to return a list of pages containing the given label. It is slow running. So, I added a mechanism to remove it when it has served its purpose with the insertion of a label. Find this solution below.

Does anyone have suggestions or ideas for improvement?

-------------------------------------------------------------------------

h4. Referenced Meetings


{show-if:label=-meetrefdone}

{choose-label:labels=meetrefdone|title=Add the meetrefdone label to remove this list|descriptions=Done Adding Meeting References}

h4. List of 10 Most-Recent Meetings (You may wish to add references to these above)

{report-block:maxResults=10}
  {content-reporter:space=@self|types=+page| label=+meeting}
  {text-sort:content:title|order=descending}
  {content-reporter}

  {report-body}* {report-info:page:title|link=true} \\

  {report-body}
{report-block}
{show-if}

1 answer

1 accepted

Content reporter is not the most efficient of all the reporters. I find local-reporter to be much faster. You could do something like (BTW: You said you wanted the 10 most recent pages... reflected the sort below):

{report-block:maxResults=10}

  {local-reporter:value:label meeting > label:content}
    {content-filter:@self|scope="your parent page" > descendents}
    {date-sort:content:creation date|order=ascending}    
  {local-reporter}

  {report-body}
    * {report-info:page:title|link=true} \\
  {report-body}

{report-block}

Thanks, David.

This makes a tight list, without hyperlinks, so it is easy to select for copy/paste into the editor.

Copy and paste the name from this list into referenced meetings:
{report-block:maxResults=10}
 
  {local-reporter:value:label meeting > label:content}
    {content-filter:@self|scope="homepage" > descendents}
    {date-sort:content:creation date|order=ascending}    
  {local-reporter}
 
  {report-body}>   {report-info:page:title} \\{report-body}
 
{report-block}

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,941 views 27 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