How To Change The Top Hook Content Depending On The Page In Prestashop

Mar 26, 2013182Alex Simonchik

By default top page menu is regulated by two types of hooks: Top and Home. The Home hook is used when you need your content to be available on the homepage only, while the Top hook is responsible for all other pages.

But what should we do if we need some content to be available both on the homepage and some other page, although not all of them?   In this case we need to verify the controller in the Top hook. The following method can be used for this task:

It will return index for the homepage.

This method should be declared in the class which contains the module. For instance, you can make the following verification in the Top hook:

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *