Get Free Audit

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

Mar 26, 2013

769 Aliaksandr 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:

Andrey_Dubina
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey


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:

Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

Post a new comment

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