How to Customize SugarCRM Header Display

This article will show you the required steps to customize the header display of SugarCRM application:


The responsible codes for emitting the header HTML script for display is done via displayHeader method in SugarView class (SugarView.php).

The header is managed using smarty templates located in assigned theme directory, for example themes/Sugar5/tpls/header.tpl. This files, in turn is retrieved via getTemplate method of $themeObject of SugarTheme class (SugarTheme.php).

So, for those who wants to customize the look and feel of the appearance of the application, can be done by copying the existing theme directory and perform modifications on the files located in the directory. And for header display, it is the header.tpl file.

Themes is located in theme directories in SugarCRM application. At start up phase, by using SugarTheme class, the application performs initialization of available themes based on theme directories.

How the available themes is activated ?

Settings of active theme is done via loadDisplaySettings method in SugarApplication class in SugarApplication.php file.

There are at least 2 variables that affecting how the active theme is set. Which are and default_theme configuration variables and sugar_user_theme cookies.

Remember that default_theme will be superseeded by the cookies. So, each time after changing the theme settings, make sure to clear the sugar_user_theme cookies on user’s browser.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: