Child pages
  • Posiciones de los módulos en el Front-Office

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Posiciones de los módulos en el Front-office

Table of Contents

A modules can have to views: one on the Un módulo puede tener dos aspectos: uno en el back-office (its options, or even a configuration screen), and one on the sus opciones, o incluso su pantalla de configuración), y el otro en el front-office. The La parte front-office view is how and where the module is displayed within your shop's theme.

The position of a module in your theme can be changed, because you might want one module's block to be placed much higher (or lower) in the page that others. In PrestaShop's parlance, this is called "transplanting", and is done using the tool available in the "Positions" page, under the "Modules" menu. In effect, this enables you to attach a module to one of the many available hooks in the current theme, without writing any code.

The "Positions" page displays all the available hooks, and their attached modules. Many are empty by default, but some of the most useful ones have a dozen of modules (the displayHeader hook has 33 modules by defaultcorresponde a cómo y dónde se mostrará el módulo en su tema.

La posición de un módulo en su tema puede ser cambiada, porque es posible que desee que el bloque de un módulo esté posicionado más arriba (o más abajo) en la página que otros. En la jerga PrestaShop, a esta acción se la denomina "trasplante", y se realiza mediante la herramienta disponible en la página "Posiciones de los módulos", bajo el menú "Módulos". En realidad, ésta le permite conectar un módulo a uno de los muchos hooks disponibles en el tema actual, sin necesidad de escribir ningún código.

La página "Posiciones de los módulos" le muestra todos los hooks disponibles, así como los módulos correspondientes que están conectados a ellos. Muchos están vacíos por defecto, pero la mayoría utilizan  fácilmente una docena de módulos (el hook displayHeader, perteneciente a la cabecera de la tienda, tiene 33 módulos de forma predeterminada).

At the top of the page, a drop-down menu enables you to only display the hook in which you are interested.
By default, this page only displays the hooks on which you can position functions. Checking the "Display non-positionable hooks" box below displays all the hooks, even those where you cannot position something.

...