Knowledgebase

How to configure module positions in PrestaShop 1.5-1.6

In PrestaShop modules are shown on the frontend with the help of the so called hooks. A hook corresponds to some position on the frontend of the site (e.g header, footer, left column, etc.). You can add modules to hooks, remove them from hooks, and reorder the modules within a hook. Keep in mind that not every module can be attached to any hook. In this article we'll briefly go over module positions.

For screenshots and some more details check out the tutorial on how to manage module positions in PrestaShop 1.5-1.6.

Change the Order of Modules within a Hook

The order in which a hook lists modules is the order in which they are shown on the frontend. You can reorder them and thus change the positions of the modules within the hook and respectively on the frontend. To do this, go to Modules menu>Positions sub-menu in the admin panel. On the page that opens find the block corresponding to the hook (e.g. displayLeftColumn). It lists all the modules attached to that hook.

There are a couple of ways you can move modules within the hook. One way is to use the up and down arrow buttons that are shown before the name of each module. Another way is to hover the mouse pointer in front of these two arrows until it turns into a four-arrow cursor. Then click and hold the left mouse button, drag the module to the position and release the button.

Add Modules to Hooks

In PrestaShop this is referred to as transplanting modules. To do it, go to Modules menu>Positions sub-menu and click on the button Transplant a module. On the page that opens use the Module drop-down menu to select the module that you want to transplant, and from the drop-down menu Hook into you can select the hook to which you want to attach it. If you don't want the module to appear on particular pages on the frontend, you can select those pages from the Exceptions list. If you want to mark/unmark more than one page in the list, press and hold the Ctrl button on your keyboard and click on the names in the list with the left mouse button. When you're done with the options don't forget to click on the Save button.

Edit and Remove Transplanted Modules

For each transplanted module you can edit the Exceptions option with which you can exclude the module from being shown on particular pages on the frontend. You can also remove a transplanted module from a hook altogether.

To edit a transplanted module, go to Modules menu>Positions sub-menu, find the hook and click on the Edit button for the particular module (in PrestaShop 1.5 the button is an icon that looks like a pencil). Note that this will affect this module only for the particular hook (the same module can be attached to other hooks). To remove the module from the hook, click on the arrow next to its edit button and from the drop-down menu that appears select Unhook. In PrestaShop 1.5 there's no such drop-down menu; the button for removing the module is right next to the one for editing and it looks like a trash can.

Move and Unhook Modules with LiveEdit

PrestaShop has a tool called LiveEdit with which you can reorder and unhook modules directly on the frontend. To launch the tool, go to Modules menu>Positions sub-menu in the admin panel and click on the button Run Live Edit. This will open the frontend of your site. The modules that you can move are marked with red lines. For each module there are two buttons: one is an icon with four green arrows and the other is a trash can. To remove a module, click on its trash can button. To move it, hover the mouse pointer over the four green arrows, press and hold the left mouse button and drag and drop the module in the position. After that click on the Save button at the top to keep the change. To close LiveEdit click on the button Close Live edit at the top of the page.

For screenshots and some more details check out the tutorial on how to manage module positions in PrestaShop 1.5-1.6.

Was this answer helpful?

 Print this Article

Also Read