Child pages
  • Pozycje we Front-Office

Versions Compared

Key

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

Pozycje w Front-

...

Office

Table of Contents
A

modules can have to views: one on the Moduł potrafi posiadać dwa widoki: Jeden w back-office (its options, or even a configuration screen), and one on the front-office. The 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 default).

Image Removed

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.

The header of the table for each hook displays the hook's name, its technical name (and for some, a quick description), and its number of attached modules. The table lists the modules that are attached to that hook.

The modules are displayed in the order in which they appear in the hook.

Moving a module within a hook

You have two ways of changing a module's position within a hookjego opcje, ekran konfiguracji etc), i drugi w Front-Office. Część Front-Office odpowiada za sposób oraz położenie, gdzie moduł będzie widoczny w szablonie Twojego sklepu.

Kolejność według której moduły pojawiają się w Twoim szablonie może być spersonalizowana, ponieważ możecie chcieć, żeby jakiś blok modułu znajdował się powyżej, lub poniżej w odniesieniu do pozostałych części. W żargonie PrestaShop nazywa się to przemieszczeniem, a używa się do tego narzędzia dostępnego w menu Moduły->Pozycje. Pozwala ono na niejako "przyczepienie" modułu do jednego z kilku węzłów zaczepienia dostępnych w aktualnym szablonie bez pisania czegokolwiek w kodzie strony.

Strona "Pozycje" wyświetla wszystkie dostępne węzły zaczepienia, a także przypisane do nich odpowiednie moduły. Wiele węzłów jest pustych domyślnie, ale najczęściej używane mają dziesiątki modułów (np. punkt displayHeader posiada domyślnie 34 moduły).

Image Added

U góry strony znajduje się rozwijane menu, które pozwala na ograniczenie widoku do punktu, który Cię interesuje.
Domyślnie lista ta pokazuje wyłącznie węzły gdzie możesz dodać funkcje. Zaznacz "Wyświetl nie pozycjonowalne węzły", aby wyświetlić wszystkie węzły, nawet te, gdzie nie możesz nic przenieść.

W nagłówku każdego węzła znajduje się jego nazwa techniczna, oraz liczba przypisanych modułów. Tabela poniżej wyświetla je wszystkie.

Moduły są przedstawione w kolejności z jaką pojawiają się w węźle.

Przemieszczenie modułu na węzeł zaczepienia

Istnieją dwa sposoby na przeniesienie modułu do węzła:

  • Click the up or down arrow. The page will reload and display the new order.
  • Drag and drop the module's row itself:
    1. Place the mouse cursor on the position number to have it change into a "move item" cursor.
    2. Click and hold while moving the cursor over the row/position where you want the module to be: the module's row changes position accordingly.
    3. Release the mouse button: the current position for the module is saved.

...