I'm very new to Confluence and NOT a programmer, so please excuse the typos and misunderstandings below :)
I'm building an overview page in Confluence (server) and would like to have the labels of the pages I link to in the overview shown.
I've tried to write a macro that does this, but I can't wrap my head around it and getting it to work.
## @param page:title=Page|type=confluence-content|required=true|desc=Select page you want to show the labels from
#set($currentPage = $pageManager.getPage($content.getId())
#set($pageLabels = $currentPage.getLabels())
<span>
#foreach( $labelObject in $pageLabels )
<span class="aui-label">
<a href="$labelObject.urlPath">$labelObject.name</a>
</span>
#end
</span>
I assume the problem is that the page I select and put into "page" is not the one being called in the following part with "getLabels()"
But how do I get the labels from the page I select?
So you are looking to create a page overview, where you find the link of pages created in confluence under that branch. If Yes then .
For the page/document you want to create, you need to add a label to e-g "Release" for your all release plans.
Go to overview , edit the over view page , create a box , where you provide a heading of the page as Release plans , and then click insert + sign add content label and add the same label in there also.. you will find your documents listed in Over view page too...
No, I've already created the overview page with a long list of pages (some child pages, some parent pages, etc.).
What I want to just insert a simple macro, that asks for what page I want to show the labels of (this could be any page)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.