Page tree
Skip to end of metadata
Go to start of metadata

Create a user specific navigation

The Navigation Menu Editor configuration contains three tabs: "Settings", "Structure" and "Help".

Settings

Activate the option Display navigation in header to integrate your menu automatically below the Confluence application header. 
In addition to a classic dropdown layout, you can display the navigation in a multi column flyout style. Menu items under second level categories will then show up on a large panel like Amazon's or eBay's navigation.
You can choose to show the menu to users that are not logged in, if your Confluence instance is accessible by anonymous users.

Choose up to three user profile fields to create a menu based on a user's profile. Assign menu entries on the structure tab. If you allow anonymous users to view the menu, they will only be shown menu items without assigned field values.
Using our Custom User Profile, you can greatly extend the range of available profile fields (including fields that are maintained in an LDAP/AD).

Configure which users or user groups are allowed to edit the menu structure. They will be shown a configuration "gear wheel" link at the right side of the menu.

If a user starts editing the navigation structure, nobody else can access this view. It gets locked until the user logs out or his session expires (Please be aware that if your admin session expires, you are not able to save your menu. The Confluence default admin session expiration time is set to 10 minutes). Confluence administrators can always unlock the editor view, but they should keep in mind that unlocking the navigation edit view might cause the loss of changes made by a currently active editor.

Structure

The structure page contains the following parts: header, menu table and footer.

The header section provides the following possibilities:

  • add top-level menu entries
  • preview the current menu structure (using the given filter values)
  • load a menu from the history of saved menus
  • export the most recently saved menu to a file
  • import a previously exported menu from a file

The header is sticky and will always be on top of the page, even if you scroll down.

You have the following options to add top-level menu entries:

  • Category item: Use category items to group sub menu entries together.
  • (Main) Menu item: Normal menu entries which will be displayed as list entries with a link to the target page or URL. (See Adding Confluence links and external links)
  • Separator item: To separate groups of different menu items you can use a separator line.

To see a preview of your current navigation structure simply click on the preview button in the right panel. You can also use the filter boxes to simulate a Confluence user's profile values to see how your navigation structure would be displayed for this user.

See Import / Export menus

See History / Backup of menus

The table header is also sticky.

NameDescription
IDMenu entry numbering. Represents the current level and position of menu entries and will change when the menu structure is changed (no unique ID).
TitleThe title of the entry. For menu items the title will default to the page or space name if a Confluence page or space is selected in the "Link" field.
LinkOnly for menu items. Start typing a page title or space name and an autocompletion dropdown will appear. You can also enter external URLs or leave the field blank to create a link to the dashboard.
You can configure if a link should be opened in a new browser tab/window by checking the box.
Filter fields
("Locale", "Name") 
You can assign all menu entries to users with given profile field values, for example their locale or name. See Display navigation entries based on user values
PositionMove the menu items by Drag'n'Drop or use the buttons in each row to change the order or level.
ActionsEdit, add or remove sub menu entries. "+ / Add" opens a context menu, where you can select which type of entry you want to add as a sub entry of the current entry.

 

If you have configured filtering attributes in the settings view (see Attributes for user restriction), you can define profile field values for each menu item. The menu entry will only be shown to users if their profile matches the entered values.

To preview the menu structure for certain attributes, you can enter arbitrary values under "Filter menu by defined attributes" as described above. For ease of use, the input fields offer auto-completion for any values you have already entered in the menu structure.

Use the wildcards and logical operators to create even more complex filters based on Confluence user values (See Wildcards and logical operators).

The footer is also sticky and will always be at the bottom of the page.

By clicking on "Save changes" a draft version of the menu is saved for further editing or publishing. Drafts are not visible to end users until they are published. By clicking on "Publish menu" the current menu is saved to a new version and is visible to end users. By clicking "Cancel editing" the currently displayed menu structure is not saved and the menu will be reset to the most recently saved version. The buttons are only clickable when they make sense (i.e., after the menu has been changed).

If an unpublished menu draft exists, any other editor opening the menu structure screen will see a warning message that there are unpublished changes. This message also shows the last user who saved the draft and the date and time the version was saved.

All published versions are marked in the history with a (tick) icon.

Provides further Information about the usage of the Navigation Menu Editor.

Others

The field for adding links has an auto completion for Confluence spaces and pages. Permission will be respected, so if a user has no permission to view a page, the link won't be shown. If you paste a confluence link by hand, the plugin will resolve this link and build a readable entry as if you added it by auto completion. This only works, if your configured base URL matches the pasted URL. Please be aware, that this is necessary for checking content permissions for the user!

You can also add external links, which will not be checked by the Navigation Menu Editor. So make sure they work and are available from your Confluence.

(warning) We differentiate between page and space links. Page links lead to a certain page, space link to the current space homepage. Note that space homepages can be changed and a space link will lead to the space home page, whereas a page link still leads to the old one. You can differentiate page and space link by their icon at the auto completion.

Due to the "Wildcards and logical operators" it is not possible to use key words in filter attributes. As a workaround, replace the key words with the same number of "?" signs (or at least one of the letters of the word).

These keys are case sensitive, so "And" or "and" would not match.

Filter AttributeWorkaroundKeyword
New York (State)New York ?State?( )
HR AND QSHR AN? QSAND
NOT for everybodyNO? for everybodyNOT
This OR ThatThis O? ThatOR

In the past, you have already been able to assign menu items to specific profile field values. Now you can also use wildcards in addition to exact values. Using logical operators (AND, OR, NOT) you can also create more complex filters, e.g., to show a menu item to all users that have not selected English as their Confluence language ("NOT en*").

Wildcard / OperatorDescriptionExample
blankmatches any value 
?matches a single characterC?O
matches CEO and CTO , but not C3PO
*matches 0 or more charactersen* 
matches en , en_GB , en_US, but not de_DE or men
ORLogical 'or' operatoren_GB OR fr_FR
matches en_GB and fr_FR , but not de_DE
ANDLogical 'and' operatoren* AND *GB
matches all values that start with en and end with GB
NOTLogical 'not' operatoren* AND NOT en_US
matches all values that start with en except en_US

The Navigation Menu Editor offers an import / export functionality, which allows you to export the most recently saved menu to a JSON file and re-import it to the same or another Confluence instance (Please note that menus imported to another instance may become invalid when the Confluence page IDs are different).

See the example file:

Exported menu.json
{
    "entries": [
        {
            "filters": [
                "en*",
                "",
                ""
            ],
            "type": "category",
            "entityID": "",
            "title": "english entry",
            "resolvedTitle": "english entry",
            "link": "",
            "targetBlank": false,
            "menu": {
                "entries": [
                    {
                        "filters": [],
                        "type": "internal-page-link",
                        "entityID": "98334",
                        "title": "1.1",
                        "resolvedTitle": "Welcome to the Confluence Demonstration Space",
                        "link": "/confluence/pages/viewpage.action?pageId=98334",
                        "targetBlank": true,
                        "menu": {
                            "entries": [
                                {
                                    "filters": [],
                                    "type": "internal-space-link",
                                    "entityID": "ds",
                                    "title": "1.1.1",
                                    "resolvedTitle": "Demonstration Space",
                                    "link": "/confluence/display/ds",
                                    "targetBlank": false,
                                    "menu": null,
                                    "resolvedLink": "/confluence/display/ds"
                                }
                            ]
                        },
                        "resolvedLink": "/confluence/pages/viewpage.action?pageId=98334"
                    }
                ]
            },
            "resolvedLink": ""
        },
        {
            "filters": [
                "de_DE",
                "",
                ""
            ],
            "type": "category",
            "entityID": "",
            "title": "german entry",
            "resolvedTitle": "german entry",
            "link": "",
            "targetBlank": false,
            "menu": null,
            "resolvedLink": ""
        },
        {
            "filters": [],
            "type": "separator",
            "entityID": "",
            "title": "",
            "resolvedTitle": "",
            "link": "",
            "targetBlank": false,
            "menu": null,
            "resolvedLink": ""
        },
        {
            "filters": [
                "",
                "",
                ""
            ],
            "type": "dashboard-link",
            "entityID": "",
            "title": "Link: 4",
            "resolvedTitle": "Dashboard",
            "link": "/confluence",
            "targetBlank": false,
            "menu": {
                "entries": [
                    {
                        "filters": [],
                        "type": "internal-page-link",
                        "entityID": "98338",
                        "title": "4.1",
                        "resolvedTitle": "Extending Confluence",
                        "link": "/confluence/pages/viewpage.action?pageId=98338",
                        "targetBlank": false,
                        "menu": null,
                        "resolvedLink": "/confluence/pages/viewpage.action?pageId=98338"
                    },
                    {
                        "filters": [],
                        "type": "dashboard-link",
                        "entityID": "",
                        "title": "4.2",
                        "resolvedTitle": "Dashboard",
                        "link": "/confluence",
                        "targetBlank": false,
                        "menu": null,
                        "resolvedLink": "/confluence"
                    },
                    {
                        "filters": [],
                        "type": "external-link",
                        "entityID": "",
                        "title": "4.3",
                        "resolvedTitle": "www.atlassian.com/",
                        "link": "https://www.atlassian.com/",
                        "targetBlank": false,
                        "menu": null,
                        "resolvedLink": "https://www.atlassian.com/"
                    }
                ]
            },
            "resolvedLink": "/confluence"
        }
    ]
}

The import and export functions can be found inside the header, below "Additional options". 

The Navigation Menu Editor offers a backup functionality to track saved versions and restore older versions. Every time you save the menu structure, a backup will be created. You can list all created backups by choosing "History" in the "Additional options". Click on "Apply" next to any history entry to restore a specific backup to the edit form. Please note that you still need to save the restored backup.

The history has a limit to reduce database usage. When the number of backups reaches 100, a pruning mechanism is triggered that will keep at most 100 published backups as well as all unpublished drafts since the second to last published version.

Rows marked with a (tick) represent published menus, the others are unpublished menu drafts.

Enable the Display navigation in header option to automatically insert the menu below the confluence application header. If you like to include it anywhere else, disable the option, go to Layouts and edit the Main Layout.
Add the menu macro at the desired position (e.g., after the page header) as shown in the following code snippet:

 

$helper.renderConfluenceMacro("{display-menu}")

In newer Confluence versions the usage of this snippet will lead to warning logs from the velocity templates. These logs can be ignored because the rendering still works fine. But to be prepared for removal of the old confluence wiki markup you have to implement a custom helper, which has to render the macro in the following new storage format:

<ac:macro ac:name="display-menu"/>

The Navigation Menu Editor can be installed via the Atlassian Marketplace (Administration > Find new add-ons).

Please make sure you've also got the Linchpin Connector plugin in version 1.1.2 or newer after the installation (it is bundled with the Menu Editor and should be automatically installed).

  • No labels