Skip to main content

Landing page module

In this tutorial, we provide you with an example module for creating and managing a landing page using the Custom Field Groups module. This example module demonstrates how to use repeaters and flexible repeaters to create adaptable and rearrangeable content blocks.

Module features

The example landing page module includes the following features:

  • Landing page management: Create and manage landing pages via a Custom Field Groups-based module.
  • Repeaters and flexible repeaters: Use repeaters and flexible repeaters for different page blocks, allowing for dynamic and rearrangeable content.
  • Adaptable content: Easily update and rearrange content blocks to suit your needs.

Module contents

The zip file of the example module includes the following files and directories:

├── controllers/
│ └── front/
│ └── page.php
├── install/
│ └── ex_module_landing_page.json
├── views/
│ └── templates/
│ ├── front.css
│ └── page.tpl
└── landingpagemodule.php
  • landingpagemodule.php: The main file for the module, handling installation and menu management.
  • controllers/front/page.php: The front controller for displaying the landing page.
  • install/ex_module_landing_page.json: The exported field group configuration for the landing page, automatically created upon module installation.
  • views/templates/page.tpl: The Smarty template for the landing page.
  • views/templates/front.css: The CSS file for styling the landing page.

Using the example module

  1. Download the module Download the complete landing page module

  2. Extract and upload the module

    Extract the downloaded zip file and upload the landingpagemodule folder to your Prestashop modules directory.

  3. Install the module

    Navigate to Modules > Module Manager in your Prestashop back office, find the Landing Page Module, and click "Install". During installation, the field group configuration from install/ex_module_landing_page.json will be automatically created.

  4. Configure the module

    After installation, go to Modules > Module Manager and click on "Configure" for the Landing Page Module. You will see a form generated by the field groups, allowing you to manage the content of your landing page using repeaters and flexible repeaters.

  5. Access the landing page

    The landing page can be accessed via the front controller at the URL specified by the module (e.g., http://yourshop.com/module/landingpagemodule/page).

Front render (default Prestashop theme)

field preview

Form render

field preview