I would like to display the pages under which the current page is nested in a breadcrumbs format along with the link.
This article was helpful to get the output but I would also need each of the pages in the breadcrumbs to have links.
Any suggestions?
Thanks in advance!
FYI, this is for Confluence Data Center version.
Hello @Lavesh Budhrani ~ if this is for DC, you could create a user macro (as opposed to a paid Marketplace app). User macros aren't available in Cloud. Here's an old post that may help (I haven't tested this): https://community.atlassian.com/t5/Answers-Developer-Questions/Add-breadcrumbs-to-a-page-with-a-user-macro/qaq-p/507751
I was able to use the following user macro code that displays the breadcrumbs in such a format:
Page Level 1 / Page Level 2 / Page Level 3 / Current Page
## @noparams #set($breadcrumbs = "") #set($breadcrumbSeperator = " / ") #getBreadcrumbs($content.id) $breadcrumbs ##recursive macro to get the path to page breadcrumbs #macro( getBreadcrumbs $contentID ) #set($thePage = $pageManager.getPage($contentID)) #set($breadcrumbs = $thePage.getTitle() + $breadcrumbs) ## Does this iteration have a parent? #if($thePage.getParent()) #set($breadcrumbs = $breadcrumbSeperator + $breadcrumbs) ## Get parent of this iteration #getBreadcrumbs($thePage.getParent().getContentId().asLong()) #end #end
I would like to enhance this code to make the breadcrumbs clickable. Any help on this is greatly appreciated!
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.