Skip to content

Home page

Home page customization

Since the version 2.3, it is now more easy to customize the home page, depending on your site. The figure below shows an example of a home page.

Each number on the figure indicates a part on which you can intervene :

1 - Main title is defined by the $TITLE variable in the configuration file (web/inc/config/config.inc),
     or better in the web/inc/config/local.inc file.

2 - Message in the banner is defined by the $BANNER variable in the web/inc/home/home_left.inc file.

3 - Text on the left part is defined by the $HTMLTEXT variable in the web/inc/home/home_left.inc file.

4 - Options and their arrangements are defined by the $OPTIONS variable in the web/inc/home/home_right.inc file.
     See more details below.

5 - Logos and links at the bottom of the page are in the web/inc/footer.inc file.


Options and their arrangements

The $OPTIONS variable in the web/inc/home/home_right.inc file defines the options and their arrangements. It is an array of arrays, each sub-array corresponding to an option, as shown in the example below:

$OPTIONS = [
    'option1' => [
        'active' => $CONFIGURATION,
        'label' => 'Configuration',
        'url' => 'viewconf',
        'icon' => 'gear', 
        'info' => '<b>Configure</b> the terminology definition file',
        'row' => 1
    ],
    'option2' => [
        'active' => $PRIVATE_ACCESS,
        'label' => 'Private access keys',
        'url' => 'access',
        'icon' => 'lock-fill',
        'info' => '<b>Manage</b> private access keys',
        'row' => 1
    ],
    'option3' => [
        'active' => 1,
        'label' => 'Dictionaries',
        'url' => 'dictionary',
        'icon' => 'person',
        'info' => '<b>Edit</b> the dictionaries (need admin access to edit or just use "maggot" user for viewing only),
        'row' => 2
    ],

...

];

# Separator after rows
$ROW_SEPARATOR = [2];

Meaning of each of the parameters defining an option

  • active : Defines whether the option is active (1) or not (0). This value is most often provided by a configuration variable defined in the web/inc/config/config.inc file. However, you can decide that an option will not appear in the menu even though it is active in the application.

  • url : Sets the URL corresponding to the option. It is recommended not to change it.

  • label : Sets the label appearing on the button in the menu. Please keep them concise and precise.

  • icon : Sets the icon appearing on the button in the menu. See icons on Bootstrap website.

  • info : Sets the text appearing in a tooltip box when you pass the mouse over the button. Note that HTML tags are supported.

  • row : Indicates the line on which the option appears. You can put 2 to 3 options per line depending on the length of the labels. Depending on the configuration settings, i.e., whether the options are active or not, you can arrange the options as you wish.

Additionally, separator lines can be inserted by specifying in the $ROW_SEPARATOR variable the row numbers where they should be inserted.

The example below shows two menus - the first is complete while the second is more minimal - depending on the options chosen as active and then visible or not.