File Structure


The Lagom template contains a developer-friendly file structure which allows to easily modify the Lagom theme.




The config catalogue includes files which may alter the theme final look.

activepages.php - declaration of which group a given subpage belongs to - responsible for highlighting the currently active page in the main menu

layouthelpers.php - a table of subpages where sidebars and headers can be ignored or a custom sidebar New

maingridclasses.php - a table of subpages for which custom classes are defined for container .main-grid

pageheader.php - a table of subpages for which additional elements or classes are defined for container: .main-header

paymentbuttons.php - a helper that allows to alter default payment methods buttons at page View Invoice

templateclasses.php - a table of subpages for which additional classes are defined for containers: .main-body and .body



Hooks allow you to execute your own code when events occur inside WHMCS. Hooks implemented in the Lagom theme do not interfere with other themes.

hook.php - an extra file with Lagom hooks including functions responsible for the changes in the look and functioning of:

  • Navbars - customize navbar
  • Sidebars customize sidebars
  • Active Pages / Groups
  • Layout Helpers
  • Template Classes
  • Main Grid Classes
  • Order Redirection
  • Page Header Type
  • Market Connect Banners

Create custom hooks

  1. Proceed to templates/lagom/core/hooks/ and create a file example.php. You may use your custom preferable name.
  2. Paste your code in the just created file - just like you do that in case of default WHMCS hooks.



In order to enhance the Lagom theme, extra language files have been created.

Override the language file

  1. Create a new folder named overrides with the templates/lagom/core/langs/ directory.
  2. Copy the language file you want to override. For example, to create an override for the English language you create templates/lagom/core/langs/english.php.
  3. Open the newly created file in your preferred editor, and edit the translations.
  4. Translations in the Lagom theme are triggered by: {$rslang->trans('KEY_1.KEY_2')}


  • eg. {$rslang->trans('social.social_network_acc')}


When modifying or adding new translations you must remember about a correct array structure. Any syntax errors will cause interruptions in the theme usage.



Precise details of the Layout catalogue can be found here



Precise details of the Styles catalogue can be found here



The main theme file including details on the theme licence, version and addon configuration.


Removing any of the folders or files that are originally located in the core catalogue may lead to numerous errors with the theme management or completely unable its usage.