×

Please give details of the problem

Skip to content

Menu bar

Menu bar allows to display a custimasable menu in the header of one web interface.

Configuration

A header has to be properly configured to the web interface to set the menu bar.

The menu bar configuration is a structure (JSONObject) with the following keys:

  • title: Title of the item
  • url: 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 structure
  • target : Target where the navigator will open the url (ie: _blank to open the url in a new tab)
  • javascript: replace url, the navigator will execute the javascript instead of contact the url
  • enabled: true/false, enable or not the item (an item disabled is not clickable)

info_1 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"
            }
        ]
    }
]

Header management

Web interface configuration