Jump to content

Editing blocktopmenu markup


Recommended Posts

Hi all, im using prestashop 1.6.

 

I want to edit the markup for the blocktopmenu module. I've looked around and it's clear that I need to look in the blocktopmenu.php file, the makeMenu() method - and go through the switch function and add my classes or whatever there.

 

My question is should I edit the /modules/blocktopmenu.php OR

Create a /themes/my-theme/modules/blocktopmenu/blocktopmenu.php file and add a makeMenu() method in that OR

Create an override class for the blocktopmenu in /overrides/blocktopmenu/blocktopmenu.php and add a makeMenu() method there?

  • Like 1
Link to comment
Share on other sites

Hi all, im using prestashop 1.6.

 

I want to edit the markup for the blocktopmenu module. I've looked around and it's clear that I need to look in the blocktopmenu.php file, the makeMenu() method - and go through the switch function and add my classes or whatever there.

 

My question is should I edit the /modules/blocktopmenu.php OR

Create a /themes/my-theme/modules/blocktopmenu/blocktopmenu.php file and add a makeMenu() method in that OR

Create an override class for the blocktopmenu in /overrides/blocktopmenu/blocktopmenu.php and add a makeMenu() method there?

You should definitely create an override for the module to be sure you will not lose anything in case of updating.

Link to comment
Share on other sites

Ok Daniel, thanks for the speedy reply.

 

If I create an override - should I need to reinstall the module, or should the makeMenu() method on my override take priority over the default right away?

I don't think it's necessary to reset the module, you just have to flush the class index by deleting /cache/class_index.php

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...