Navigation Map Macro

Add the Navigation Map macro to a page to display pages tagged with a specific label in a grid layout. 

This macro is great for for visually representing a small set of pages with a particular label. You could:

  • display of all pages that have the label 'needs-review' for highlighting pages that need work
  • display all pages with the label 'how-to' in your knowledge base. 

If you want to get really fancy, you can style the macro by creating your own Velocity theme. This does require writing some code though. 

On this page:

Screenshot: page with a Navigation Map macro displaying pages with the label 'printer-how-to'. 

Want more flexibility? Check out the Content by Label Macro for a more modern way to display a list of pages with specific labels and more.

To add the Navigation Map macro to a page:

  1. From the editor toolbar, choose Insert > Other Macros.
  2. Choose Navigation Map from the Navigation category.
  3. Enter a label.
  4. Choose Insert

You can then publish your page to see the macro in action. 

Screenshot: specifying a label and title in the Navigation Map macro


Macro parameters are used to change the behaviour of a macro.

To change the macro parameters:

  1. In the editor, click the macro placeholder and choose Edit.
  2. Update the parameters as required then choose Insert.

Here's a list of the parameters available in this macro. 

Parameter

Default

Description

Label

none

Specify the label associated with the pages you want to show in the navigation map.

This parameter is unnamed in storage format and wikimarkup.

Map Title
(title

none

Specify a title for the navigation map.

Number of Cells Per Row

(wrapAfter)

5

Specify the number of cells in a row

Cell Width (Pixels)
(cellWidth

90

Specify the cell width (enter a number only, don't include px)

Cell Height (Pixels)
(cellHeight

60

Specify the cell height (enter a number only, don't include px)

Navigation Map Theme
(theme )

Confluence

Define a theme for the navmap. See further info below.

Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example).

If you want to create your own navmap 'look and feel' (for example, one with rounded corners), you need to add a customized navmap macro theme file to the WEB-INF/classes/com/atlassian/confluence/plugins
/macros/advanced
directory. The file name convention to use is navmap-mytheme.vm. Use the name of your choice for the mytheme part of the file name, which is also the value you use for this parameter. Hence, if your theme was called navmap-roundededges.vm, use the value of roundededges for this parameter.

The theme must be written in Velocity. See Velocity User Guide for more information. 

Type followed by the start of the macro name, to see a list of macros. 

This is useful when you want to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.

Macro name: navmap

Macro body: None.

{navmap:mylabel|wrapAfter=4|title=My map name|cellHeight=50px|theme=navmap-mytheme.vm|cellWidth=80px}



Last modified on Dec 7, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.