Choosing links to insert from a menu

Kevin Buchs
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 14, 2011

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

1 vote
Answer accepted
David Dube
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 14, 2011

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}

Kevin Buchs
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 14, 2011

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
TAGS
AUG Leaders

Atlassian Community Events