Best practices for editing GFI HelpDesk templates
You can customize the complete look and feel of the support center using the template system. The template system (found in the admin control panel under Templates) lets you modify the style, content, and layout of the templates.
The support center is put together using several templates. For example, there is a template for the header, footer, and one for the CSS (clientcss).
Below are some best practices for template customization:
As part of an update, GFI HelpDesk may make a change to the support center templates.
When you update your helpdesk, GFI HelpDesk does not automatically apply these changes to your templates. Instead, it marks the respective template as out of date and asks you to restore the template to its original version. Until this is done, the support center does not reflect the latest update to your helpdesk.
The reason why GFI HelpDesk does not do this automatically is to give you a chance to check if you have customized the template that needs to be restored. If you have customized the template, you then have the opportunity to make a note of the customizations made so that you can reapply them once the template has been restored.
GFI HelpDesk saves a history of your template changes. This history is available even if you restore the template. After you have selected your template (Home > Settings > Templates > Group > Templates > General > Select template) you can choose History, and you'll be able to compare between versions allowing you to quickly identify and re-apply your changes.
Find out more about restoring templates and read below to find out about template customizing best practices.
It is important to consider carefully how to achieve the customizations you want for your support center, and to consider whether modifying the HTML in templates is necessary.
There are two reasons you'll want to modify as few templates as possible:
- The more templates you change, the more inconvenience you can face if GFI HelpDesk makes a change to a template as part of an update (which means that the template would be out of date and would need to be restored to its latest original version and your customizations needs to be reapplied).
- The more templates you change, the more difficult it is to isolate any problems.
All of the CSS for the support center is contained in one template called clientcss.
Because this template covers all of the support centers, GFI HelpDesk may modify it between helpdesk updates to add new functionality or fix bugs.
Therefore, we suggest that any CSS changes you wish to make should be made in the customcss template. We'll never make changes to this template; it is empty and intended solely for your custom CSS. It is loaded after clientcss, meaning anything in customcss overrides clientcss.
For example, by default clientcss includes a statement to style the title of knowledgebase articles:
If you wish to increase the font size, rather than modifying this statement in clientcss, you should override the statement using the customcss template by adding:
Because customcss is loaded after clientcss, the element kbtitle ends up with a font-size of 40px and a font-weight of 200.
For example, you want to hide the author avatar shown on knowledge base articles. In the template knowledge base article you find the following HTML:
Rather than modifying the template directly by deleting this HTML, you could create a new CSS statement in the customcss template to hide it: