Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Allow users to feed back on problems with documentation

Neven Reynolds
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 11, 2022

Hi,

We currently have a very large amount of public facing documentation on our confluence instance. Keeping it up to date is quite a challenge.

I want to know if there is any kind of macro that I could insert on a confluence page (or all pages in a space) that a user could click to give feedback on documentation that was not clear or out of date.

If this could result in a jira ticket with the specific page and a user's comment listed, it would be ideal, but Id be open to other options.

Thanks

1 answer

1 accepted

0 votes
Answer accepted
ice-ccull
June 2, 2015
  1. I was able to create a User Macro to display all pages in the space that do not have a label.  Here is the code:

    ## @noparams
    #set($containerManagerClass=$action.class.forName('com.atlassian.spring.container.ContainerManager'))
    #set($getInstanceMethod=$containerManagerClass.getDeclaredMethod('getInstance',null))
    #set($containerManager=$getInstanceMethod.invoke(null,null))
    #set($containerContext=$containerManager.containerContext)
       
    ## the pageManager gives you access to the pages
    #set($pageManager =$containerContext.getComponent('pageManager'))
     
       
        <b>Unlabeled pages in space $space.name<b>
        <ul>
        #foreach( $page in $pageManager.getPages( $space, true) )  
     
            #if( $page.labels.size() == 0 )
                   <li><a href="$req.contextPath$page.urlPath">$page.title</a></li>
            #end
        #end
        </ul>
  2. I was able to create a User Macro to display all pages in the space and their associated labels.

    ## @noparams
    #set($containerManagerClass=$action.class.forName('com.atlassian.spring.container.ContainerManager'))
    #set($getInstanceMethod=$containerManagerClass.getDeclaredMethod('getInstance',null))
    #set($containerManager=$getInstanceMethod.invoke(null,null))
    #set($containerContext=$containerManager.containerContext)
       
    ## the pageManager gives you access to the pages
    #set($pageManager =$containerContext.getComponent('pageManager'))
     
       
        <b>Pages in space $space.name and their associated labels.<b>
        <ul>
        #foreach( $page in $pageManager.getPages( $space, true) )  
     
              <li><a href="$req.contextPath$page.urlPath">$page.title</a> - $page.labels</li>
        #end
        </ul>

 

 

 

RWilburn
March 23, 2021

I know it's been a few years since you posted this... Thank you! It is very helpful! I am using the one that lists the labels associated with each page, and it works great!

I would also like to be able to see a list of pages associated with each label. The Labels list macro does this, but I'd like to see the list of pages without having to click each label. It seems like it should be simple to modify your code above to do that, but I am struggling with it. Is there any way you could help with this?

Thank you!!

ice-ccull
March 24, 2021

Honestly, 

I probably haven't looked at this since 2015. Hopefully someone else can help or there's additional guidance out there. 

I am glad to hear that I was able to contribute somewhat positively though!

Good luck finding a way to get what you're looking for!

 

Chad

RWilburn
March 25, 2021

LOL! I thought it was a long-shot after so many years. Thank you for replying, though! And, yes, your macro is very helpful for sure!

Thank you!

Rhoda

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events