Menu bar
The menu bar allows the display of a customizable menu in the header of one web interface.
Configuration
Header
A header has to be properly configured to the web interface to set the menu bar.
Configuration - Menu bar
The menu bar configuration is a structure (JSON Object) with the following keys:
title
: Title of the itemurl
: URL of the item (the browser will redirect to this URL when the user clicks on the title).image
: Replace the title with an image (this key has to contain a URL of the image).visible
:true
/false
, display or not the item (can be a Freemarker code, ie:${has_right('1234')}
)option
: Define a second menu level. This key has to contain a structure with the same key/value as the main structure.target
: Target where the browser will open the URL (ie:_blank
to open the url in a new tab)javascript
: replaceurl
. The browser will execute the Javascript code instead of redirecting to the URL.enabled
:true
/false
, enable or not the item (an item disabled is not clickable).
You can use freemarker in the value of the key but your structure should always be a JSONObject
Example
[{
"title" : "Home",
"image" : "https://rmp-public.s3.amazonaws.com/public/icons/home-icon.png",
"url" : "pub/2/appli/120090"
}, {
"title" : "New RFP",
"url" : "pub/2/appli/120090"
}, {
"title" : "Reports - My Tasks",
"url" : "pub/2/appli/120090"
}, {
"title" : "Dashboard",
"visible" : "${has_right('145871')}",
"option" : [{
"title" : "Region",
"url" : "pub/2/appli/120090"
}, {
"title" : "Country",
"url" : "pub/2/appli/120090"
}
]
}, {
"title" : "BackOffice",
"option" : [{
"title" : "Agencies",
"url" : "pub/2/appli/120090"
}, {
"title" : "Go To Google",
"url" : "http://www.google.com/",
"target" : "_blank"
}, {
"title" : "Country",
"url" : "pub/2/appli/120090"
}
]
}
]
Please give details of the problem