Menu bar
Menu bar allows to display a custimasable 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.
Menu bar
The menu bar configuration is a structure (JSONObject) with the following keys:
title
: Title of the itemurl
: URL the item (the navigotr will contact this url when the user click on the title)image
: Replace the title by an image (this key has to content an url of image)visible
:true
/false
, display or not the item (can be a freemarker ie:${has_right('1234')}
)option
: Define a second menu level. This key has to content a structure with the same key/value than the main structuretarget
: Target where the navigator will open the url (ie:_blank
to open the url in a new tab)javascript
: replaceurl
, the navigator will execute the javascript instead of contact the urlenabled
: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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | [{ "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