Chapter 14. Creating own themes

You can create your own themes for OTRS to use the layout you like in the web frontend. To create own themes the output template have to be customized to your needs.

More information about the syntax and structure of output templates can be found in the Developer Manual on http://doc.otrs.org , especialy in the chapter about templates .

To create a new theme called "Company" perform the following steps:

  1. Create a directory called Kernel/Output/HTML/Company and copy all files, that you like to change, from Kernel/Output/HTML/Standard into the new folder.

  2. Customize the files in the directory Kernel/Output/HTML/Company and change the layout to your needs

  3. To activate the new theme for OTRS the database has to be changed manualy and the new theme has to be added to the theme table in the OTRS database. Use the following commands with MySQL:

    linux:~# mysql -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 26 to server version: 5.0.22-Debian_2-log
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql> use otrs;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    mysql> INSERT INTO theme
        ->     (theme, valid_id, create_time, create_by, change_time, change_by)
        ->     VALUES
        ->     ('Company', 1, current_timestamp, 1, current_timestamp, 1);
    mysql>
        

Now the new theme should be useable in OTRS. It should be possible to select it via your personal preferences page.

Warning

Do not change the theme files shipped with OTRS, the changes will be lost after an update. Create your own themes only performing the steps described above.