Custom Content Breadcrumbs

Defines the breadcrumbs for this content

Use Relation API to generate breadcrumbs

An add-on can specify multiple content relationships for generating the breadcrumbs. Suppose we have ac:add-on-key:employee defined with following breadcrumbs setting:
1
2
3
4
5
6
7
8
9
10
11

 ...
 "breadcrumbs": {
   "relations": [
     {
       "name": "worksFor"
     }
   ]
 }
 ...
 

And we have following custom content created in the Confluence:

Example custom content for building search breadcrumbs
Content IDContent TypeTitle
1ac:add-on-key:organizationCompany A
2ac:add-on-key:organizationCompany B
3ac:add-on-key:employeeCharlie

By using the Relation API we can create following relations between these content:

  • Charlie works for Company A: PUT /rest/relation/worksFor/from/content/3/to/content/1
  • Charlie works for Company B: PUT /rest/relation/worksFor/from/content/3/to/content/2

Since we have let ac:add-on-key:employee to use worksFor relation to generate the breadcrumbs. Confluence will fetch the relations that were created under name worksFor, then display the titles in the creation order of their relations in the search result like this: Quick search breadcrumbs

Similarly the site search will display the breadcrumbs as well: Quick search breadcrumbs

Properties

relations
Type
Description

Defines the list of content relations used for generating breadcrumbs
Following sorting orders will apply:

  • Relationships defined in different names: Sorted by the order defined in this field
  • Relationships defined in the same name: Sorted by creation time of the relation