Modules

Introduction

The chapter focuses strictly on the development section. For administrative information check out an administration tutorial.

Main assumptions

The customer panel comes with an easy way of developing and deploying new modules to the panel. It provides you an out-of-the-box configuration with a few steps needed for proper running.

 

 

 

 

System 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:

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

If your module is not visible in the menu try to initiate the configuration rebuild from within the OTRS console.
1. Login on your server using SSH
2. Change user to otrs
3. Run config rebuild command -> /opt/otrs/bin/otrs.Console.pl Maint::Config::Rebuild

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