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

Mar 26, 2013

288 Alex 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:

Vlad Yunusov

Partner With Us

Let's discuss how to grow your business. Get a Free Quote.
Talk to Vlad


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:

Vlad Yunusov

Partner With Us

Looking for a partner that will help you to grow your business? We are the right company to develop your webstore. Feel free to get in touch with us. We will be happy to discuss your business opportunities and provide you with a Free Quote. Talk to Vlad

Post a new comment

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