/ /website-builder/ /extensions/ /module-integration/ /order-form/

# Customize Existing Page

Lagom WHMCS Client Theme delivers the possibility to overwrite the existing pages. This functionality comes in handy when you would like to offer multiple designs for a single Lagom WHMCS Client Theme page that can be managed via Page Manager. This feature will empower you to overwrite specific .tpl files.

# Before You Begin

  1. Custom page templates need to be manually updated along with every new version of the Lagom WHMCS Client Theme. It is required to compare the original file, which was used to create the override, with the custom page template file. During the comparison, all new changes need to be manually added to your custom page template file.
  2. The functionality described below has been designed for the already existing Lagom WHMCS Client Theme pages. In order to create a new Lagom WHMCS Client Theme page, please follow the Create Custom Page article.

# Create New Page Template

This option proves useful when designing a new Lagom page template from scratch. Refer to the instruction presented below if a specific Lagom WHMCS Client Theme page has only the “Default” template in Page Manager settings.

# Prepare Template Files

  1. Log in to FTP/SFTP of your WHMCS server.
  2. Navigate to the/templates/lagom2/core/pages directory and open a specific page folder. For example, if you wish to create a new template for the “affiliates” page, you should open the /templates/lagom2/core/pages/affiliates folder.
  3. Add a new “template” folder (do not use any special characters or spaces for its name). For example, to create a new template called “mynewtemplate” for the “affiliates” page, create /templates/lagom2/core/pages/affiliates/mynewtemplate.
  4. Open the newly added “template” folder.
  5. Create the pageoption.php file and paste the below code. Replace [Enter Template Name] with your template name.
<?php

return [
    'display_name' => '[Enter Template Name]',
    'preview'      => 'thumb.png',
];

# Modify Page Code

  1. Create a new .tpl file. This file should have the same name as the “page” folder name from step 2. Following our example, it should be named affiliates.tpl for the “affiliates” page.
  2. Once you finished creating the empty “template” files for a specific Lagom page, now you need to locate the original .tpl file to duplicate its code:
    • If the modified page is one of the client area pages, then go to /templates/lagom2/
    • If the modified page is one of the ordering process pages, then go to /templates/orderforms/lagom2
  3. Open the .tpl file which contains the same name as the “page” folder name that you have created. Following our example, it is the /templates/lagom2/affiliates.tpl file.
  4. Copy its content between {else} and {/if} tags.
  1. Open the file created in step 6 and paste the previously copied code.
  2. Perform needed modifications.
  3. Navigate to the RS Themes addon and activate the created Page Template. It is possible to preview the added template only for your browser session:
    • open your browser and visit the page that you are customizing,
    • add ?rspage=[template name], or &rspage=[template name] if a specific URL already has one ? sign,
    • your custom template will be activated only for your browser session.

# Modify Existing Page Template

This option grants you the possibility to perform the customization of the already existing Lagom page template. Please DO NOT implement any changes to the existing Lagom page template files, as such changes will be overwritten by future Lagom WHMCS Client Theme updates.

  1. Log in to FTP/SFTP of your WHMCS server.
  2. Proceed to the /templates/lagom2/core/pages directory and open the “page” folder that needs to be modified.
  3. Duplicate the “template” folder that should be edited and then rename it (do not use any special characters or spaces).
  4. Open the duplicated folder.
  5. Open the pageoption.php file and change the display_name value.
  6. Go to the .tpl file and make necessary modifications.
  7. Come back to the RS Themes addon and activate the created Page Template. You can take a look at the created template only for your browser session:
  • open your browser and visit the page that you are customizing,
  • add ?rspage=[template name], or &rspage=[template name] if a specific URL already has one ? sign,
  • your custom template will be activated only for your browser session.