1. Module Menu

    Article: AN0001820Updated: 04.08.2023

    This module contains webpart Menu, that will appear in the webparts selection screen in the design of ObjectGears page. Webpart is used for creation of menu with several columns. References can be inserted to various tabs. Each category has its own title.

    Particular references will be displayed only if the user has access right to the referred object. The only execption is htmllink, that is always displayed.


    Following syntax is used to configure the webpart.

    • state the commands on particular rows
    • values in row are separated by the pipe sign |
    • values are set in format:

                name_1=value_1|name_2=value_2|name_3=value_3

    • rows that do not contain sign "=" are ignored, including empty rows
    • in order menu item is displayed two conditions have to be met:
      • there has to be ObjectGears object with the given code
      • user has to have access right to the object
    • when entering more categories they will be displayed each next another and automatically wrapped according to the page breadth

    Commands:

    group=Group name

    • name of group, name can be localized
    • command group is not mandatory
    • when you use this command state it as the first command

    cat=Category name

    • name of category, name can be localized
    • everything before the first category is ignored

    Commands for displaying objects:

    Object Action Necessary access rights
    classdef=model_code.class_code|typeUrl=l Displays list of class records Reading class records
    classdef=model_code.class_code|typeUrl=n Displays a new class record Reading class records
    query=model_code.query_code Displays list of query records Reading query records
    export=export_code Displays page for export execution Export execution
    import=import_code Displays page for import execution Import execution
    page=page_code Display of page without model Page display
    page=model_code.page_code Display of page belonging to a model Page display
    report=report_code Display of report Report execution
    htmllink=url Go to url -

    text=name - enables to display custom name, name is localized
    img=url to icon - if it is defined than icon is displayed before the name
    tooltip = tooltip text -  enables to define a localized text that will appear in the context menu after moving mouse over the menu text 

    Example:

    cat=cs-CZ::Úkoly 1~en-US::Tasks 1
    classdef=easytask.ukol|typeUrl=l|img=imagesdata/system/sum.png
    classdef=easytask.task|typeUrl=n|text=cs-CZ::Nový úkol~en-US::New task|img=imagesdata/system/plugin.png
    htmllink=http://www.objectgears.en|text=objectgears.eu

    Image size

    You can set size of the images in pixels by means of attributes imgwidth and imgheight.

    classdef=easytask.task|typeUrl=l|img=imagesdata/system/sum.png|imgwidth=200|imgheight=100

    Parameters in URL

    You can add text strings at the end of the command that will be added at the end of the URL as a URL parameter.

    Example:

    classdef=easytask.task|typeUrl=n|text=de-DE::Neue Aufgabe~en-US::New task|img=imagesdata/system/plugin.png|filter=all

    Styles

    Styles for display in webpart Menu are stored in the file Module_Menu.css in folder of the module. Styles can be changed and will impact all the webparts from the same module. If you want to have more colour schemes, install the module to more folders. You can set different styles for each folder.

    Dynamic settings

    Menu definition can be set firmly in the webpart configuration. However, it can be also defined dynamically on page by means of webpart property DefinitionItems.

    function OnLoad()
    {
        OGWebParts['code_1'].DefinitionItems = 'cat=IT catalogue|text=kategorie 1\nclassdef=it.incident|typeUrl=l|img=imagesdata/system/exclamation.png';
    }

    Example of menu appearance

    Example of using links without categories and groups.

     

    Example of four groups (big buttons) and categories (red headlines). Links are below categories.

     

    Example of webpart configuration.

     

×