Navigation Menu Editor
Always keep the overview: A menu to provide structure and guide you quickly
See the documentation for your Release
JavaScript API
In some cases it may be desirable to render the menu structure yourself. We have built some JavaScript components that get the menu structure for the current user in JSON format (both just use the REST API which is documented below) or the information whether the current user is allowed to edit the menu structure.
New style:
/** * Get the JSON representation for the menu of the current user. * @return jQuery Ajax (jqXHR) object. */ SeibertMedia.MenuEditor.MenuBuilder.getMenu() /** * Get the information whether the current user is allowed to edit the menu structure. * @return jQuery Deferred that is resolved when the current user has permission to edit the menu and rejected when not. */ SeibertMedia.MenuEditor.MenuBuilder.getEditPermission()
Old style:
/** * Get the JSON representation for the menu of the current user. * The JSON also includes a boolean field "userHasEditPermission" that is true when the current user is allowed to edit the menu structure * @param callback Function to process JSON, e.g. processJSON(Object menuJson) { ... } */ SeibertMedia.MenuEditor.MenuBuilder.buildJsonMenu(function callback)
REST API
End points
Resource | Description | Permission |
---|---|---|
GET menueditor/2.0/menu/current-user | Returns the navigation structure for the current user in JSON format | Everyone |
GET menueditor/2.0/permissions/currentuser | Returns true or false if the current user has permission to edit the navigation structure | Everyone |
Menu Resource Details
GET menueditor/2.0/menu/current-user
Resource URL: <HOST><CONTEXT>/rest/menueditor/2.0/menu/current-user
Result (Example)
key | description |
---|---|
entityID | ID of the Confluence Entity (Page ID or SpaceKey) |
title | |
link | external URL if entry is an external link |
type | "category", "separator", "internal-space-link", "internal-page-link", "dashboard-link", "external-link" |
targetBlank | if "true", the link opens in a new tab/window |
filters |
GET menueditor/2.0/permissions/currentuser
Resource URL: <HOST><CONTEXT>/rest/menueditor/2.0/permissions/currentuser
Result (Example)
{ "permitted":true }