How to Change Modules Position in Prestashop 1.7

How to Change Modules Position in Prestashop 1.7

It happens that you need to change the position of a module’s block on the frontend, for example, you want to place it higher or lower on the page. So in Prestashop 1.7, it can be done by using a special tool, you can find on “Positions” page. This tool lets you attach a module to one of the various available hooks in the theme, and you don’t need to write any code.

At first let’s take a look at the position of the blocks on the home page, and for example, let’s try to move Popular Products block higher than Image Slider.

How to Change Modules Position in Prestashop 1.7

Ok, as usual, you need to log into your admin panel and navigate to:

Design => Positions

How to Change Module’s Blocks Position in Prestashop 1.7

Each block has a header with the hook’s name (technical name) and you can see a number of attached module here as well. These modules are displayed in the order in which they appear in the current hook.

Let’s find displayHome hook, and try to move the module within it.

How to Change Module’s Blocks Position in Prestashop 1.7

There are 2 ways how you can do that:

  • Use up and down arrows;
  • Just drag and drop the module’s row.

All the changes will be saved automatically.

How to Change Module’s Blocks Position in Prestashop 1.7

Now let’s check the frontend: as you can see, Popular Products block now on the top.

How to Change Module’s Blocks Position in Prestashop 1.7

Actually, in Prestashop, you can add a module to more than one hook. And before you start transplanting a module, please pay attention to a couple of points below:

  • Some modules are written to only be attached to a given set of hooks;
  • Some hooks are written to not accept some specific kinds of modules.

Additionally, take into account that you can not transplant any module to any hook. So at first make sure you disabled the cache when testing a new module in the frontend (Advanced Parameters – Performance).

There are two ways how to transplant a module:

  • Click Edit button in the module’s row;
  • Click Transplant a module button in the upper-right corner of the page, and then choose the necessary module in the list.

How to Change Module’s Blocks Position in Prestashop 1.7

So there you’ll face the Transplantation interface.

The transplanting process has its own interface:

  1. In the Module drop-down, please select the module you want to transplant.
  2. In the Transplant to drop-down please select the hook where you want to transplant the module.
  3. In the Exceptions field please specify the files for which you do not want the module to be displayed.
  4. Don’t forget to save all changes.

How to Change Module’s Blocks Position in Prestashop 1.7

Please note that modules cannot be moved just about anywhere: it depends on both the theme’s hooks and each module’s hook support. Therefore, you mostly can only move modules within their understood context: column modules can be moved within a column as well as from one column to the other (right to left, for instance), while regular homepage modules (the ones at the center) can only be moved within their specific column.



Post a new comment

top