Skip to main content

XML Configuration

XML Configuration File

Configuration determines the main aspects of the module. Each one regardless of future different configurations has the same core model:

 <?xml version="1.0" encoding="UTF-8" ?>
<otrs_config version="2.0" init="Application">  
	<Setting Name="OTRSFrontendModule::<NAVIGATION_NAME>" Required="0" Valid="0">
        <Description Translatable="1">Module random description</Description>
        <Navigation>CustomerFrontend</Navigation>
        <Value>
            <Hash>
                <Item Key="id">LatestActivity</Item>
                <Item Key="type">[module/redirect/hidden]</Item>
                <Item Key="text">Latest Activity</Item>
                <Item Key="to">/module/LatestActivity</Item>
                <Item Key="icon">timeline</Item>
                <Item Key="priority">110</Item>
                <!--OPTIONAL-->
                <Item Key="mode">[newWindow/tab]</Item>
                <Item ValueType="Textarea" Key="widgets">
                    [
                        {
                        "props": {
                        },
                        "id": "5",
                        "widgetFile": "WIDGET_Timeline.js",
                        "compiled": false,
                        "view" : "Dashboard",
                        "slot" : "slot3",
                        "name": "Latest Activity"
                      }
                    ]
                </Item>
            </Hash>
        </Value>
    </Setting>
</otrs_config>  

<Hash> specifies main configurations settings:

  • <id>
    An identification key for your module. Should be unique for every module.
  • <type>
    Determines the type of the module. For further information check out the administration guide for modules.
  • <text>
    Display label for frontend panel.
  • <to>
    Specify the URL path to the module. If redirect was chosen as a type this field specifies redirection link.
  • <icon>
    Specify the name of the icon to display. Available icons can be found in this icon library.
  • <priority>
    The higher the priority the higher the module is on the menu. 
  • <widgets>
    Set an array of widget configurations that should be placed in the module. More on widget configuration here.
  • [Optional] <mode>
    Active if type set to redirect. Specifies the way in which the system will display the redirection page.
    Available options are:
    - newWindow
    - tab

Available modules

Another step is to include a module name in the CustomerOTRSFrontendModule::AvailableModules in system configuration.

include_module.png

It's important to pass the module's id as a configuration key.

Permissions

The last step is to set visibility of the module for predefined CustomerUser groups in the CustomerOTRSFrontendModule::Permissions

permission.png

After completion of these three steps, your module is ready to go!