Pluggable menus in Evolution

By default each plugin has a single menu entry for loading plugin main page (for each user access level).

Evolution skin supports adding more menu entries from plugins. This feature is called pluggable menus.

Enabling pluggable menus

Pluggable menus are enabled by adding extra configuration lines in plugin.conf file.

New entries are menu_admin, menu_reseller and menu_user. The value should be a relative path to a plugin script, which when executed would return additional menu entries in JSON format.

Example plugin.conf file:


Adding these three lines will enable pluggable menus for all user levels and will instruct DirectAdmin to load static menu file from:

  • /usr/local/directadmin/plugins/{name}/images/menu.json

In this example menu is placed in ./images directory to prevent it being rendered inside the skin template used for showing plugin GUI.

Menu content can be generated dynamically by using plugin scripts in RAW mode.

Menu file should be a valid JSON document. It is an array of menu category objects. Structure of menu category object:

namestringVisible menu category text
iconURLURL used to load menu icon
entriesarray of objectsList menu menu entries in this menu category

Each category can include list or menu entries described by the menu entry object. Object structure:

namestringVisible menu entry text
iconURLLink to menu entry icon
hrefURLLink to open whem menu entry is clicked
newTabbooleanWhen true menu entry will be opened in a new tab, useful for external links or scripts working in RAW mode
updatesintegerWhen set to value other than 0 would show an extra icon to the menu entry hinting there are a given number of events inside

Example of static pluggable menu file:

    "name": "Useful links",
    "icon": "",
    "entries": [
        "name": "Google",
        "icon": "",
        "href": "",
        "newTab": true,
        "updates": 1
        "name": "Wikipedia",
        "icon": "",
        "href": "",
        "newTab": false,
        "updates": 0
Last Updated: