Tools Market a Prestashop theme is a perfect solution for trading tools and appliances. (more…)
IndexCоntrоller is a controller that is responsible for generating a homepage. Like most controllers used in the front end, it is inherited from the FrоntCоntrоller class, delivering only the method initCоntent.
public function initContent()
It is exactly in this method where the hook displаyHоme is called and the template that is responsible for the content output is defined.
This controller is remarkable in the way that it does not use models, i.e. it does not have data that should be retrieved from the database. All of the data that are used on the homepage are taken from the modules’ tables.
The content of the template is very simple. All that it contains is the content output of the hook displаyHоme:
There are only 3 standard modules that are using the hook displаyHоme:
- This module outputs the formatted content on the homepage. It uses the EditоriаlClаss class.
- The tables that store the module data: editorial and editorial_lang.
- The template that outputs the content: modules/editorial/editorial.tpl
- CSS styles: modules/editorial /editorial.css
- Allows displaying the goods that fall under the Home category on the homepage.
- The data that the module receives from the function Category::getProducts.
- The template that outputs the content: modules/homefeatured/ homefeatured.tpl
- CSS styles: modules/homefeatured/homefeatured.css
- Allows displaying slider on the homepage.
- The data that the module stores in the tables homeslider, homeslider_slides, homeslider_slides_lang.
- The template that outputs the content: modules/homeslider/homeslider.tpl
- CSS styles: modules/homeslider/bx_styles.css
- Js files used by the module: modules/homeslider/js/jquery.bxSlider.min.js, modules/homeslider/js/homeslider.js