christmas sale
40%
discount for lifetime!
See plans down arrow

File Structure

TIP

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

core Files Structure

Screen

Config

templates/lagom/core/config/

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 added

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

templates/lagom/core/hooks/

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.

Lang

templates/lagom/core/lang/

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

Create custom language file

  1. Move to templates/lagom/core/langs/ directory and create a new catalogue, name it as follows overrides
  2. At templates/lagom/core/langs/ directory, find a file for which you are going to modify or add your own translations. Paste its contents in the newly created overrides catalogue
  3. Translations in the Lagom theme are triggered by: {$rslang->trans('KEY_1.KEY_2')}

Screen

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

WARNING

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

Layouts

templates/lagom/core/layouts/

Precise details of the Layout catalogue can be found here

Styles

templates/lagom/core/styles/

Precise details of the Styles catalogue can be found here

rstheme.php

templates/lagom/core/rstheme.php

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

WARNING

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.