The Lagom template contains a developer-friendly file structure which allows to easily modify the Lagom theme.
core Files Structure
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
pageheader.php - a table of subpages for which additional elements or classes are defined for container:
paymentbuttons.php - a helper that allows to alter default payment methods buttons at page
templateclasses.php - a table of subpages for which additional classes are defined for containers:
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
- Proceed to
templates/lagom/core/hooks/and create a file
example.php. You may use your custom preferable name.
- 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.
Create custom language file
- Move to
templates/lagom/core/langs/directory and create a new catalogue, name it as follows
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
- Translations in the Lagom theme are triggered by:
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.