The macro retrieves all Confluence spaces and iterates through each to gather all labels associated with content in those spaces. It then compiles the labels into a single list and renders them in alphabetical order as clickable links. Each label link leads to a filtered search page displaying content tagged with that label.
#set($spacesParam = $parameters.spaces)
#set($allLabels = [])
## If a specific space key(s) are provided, split and prepare a list
#if($spacesParam)
#set($spaceKeys = $spacesParam.split(","))
#else
## Retrieve all spaces if no specific space keys are provided
#set($spacesResponse = $ConfluenceManager.get("/wiki/api/v2/spaces"))
#set($spaceKeys = [])
#foreach($space in $spacesResponse.results)
#set($discard = $spaceKeys.add($space.key))
#end
#end
## Iterate over each space key to get labels
#foreach($spaceKey in $spaceKeys)
#set($labelsResponse = $ConfluenceManager.get("/wiki/rest/api/space/$spaceKey/label"))
## Collect all labels from the space
#foreach($label in $labelsResponse.results)
#set($discard = $allLabels.add($label.name)) ## Add only the label name
#end
#end
## Sort and render the labels
<ul>
<p style="border-bottom: solid 1px lightgrey; width: 15%;">
<img src="https://dummyimage.com/70x50/f7f7f7/000000&text=A-Z" alt="A-Z icon">
</p>
#foreach($label in $sortTool.sort($allLabels))
<li style="list-style-type: none; margin: 5px;">
<a href="$baseUrl/dosearchsite.action?cql=label=${label}" target="_blank">$label</a>
</li>
#end
</ul>Display a list of Confluence pages with CSV download feature
Space Information macro by space Id
Display page edit and view restrictions in Confluence to get essential permission details, including users, groups, and inherited access.
Parses a table containing cost and currency columns, converts each row's value into a selected result currency, and appends a footer row showing the total sum. Useful for tracking multi-currency expenses and reporting totals in a unified currency.
Macro that dynamically lists all its child pages in a table format
Display a list of guest users in a specific Confluence space
Retrieve and display labels from a specified space
Displays a list of pages in specific space with certain title or label
Create dropdown menus in Confluence Cloud with predefined sets of options, multiselect features, and permission gates
List out a table to display the assignee history for Issues by JQL. Shows the following information: Issue Key, Summary, and Assignee history