Jump to content

[MODULE] disable other modules on specific pages or enable them


Recommended Posts

I was thinking about disabling modules on specific pages. I found that modules hook to head or other hooks but they are not used on main page. The google score is killing me because of this. Is there a module that will be able set on what pages other modiles will run and on what pages modules will not run?

Link to comment
Share on other sites

2 hours ago, Daresh said:

It is a built in feature when editing a specific module attached to a specific hook, take a closer look and you'll find it.

No its not, some modules hook to head instead of checkout. They load .js and .css on all pages instead of the ones they are used at the moment. I have recaptcha module from prestashop store it loads everywhere instead of the pages that it soppose to like register login or checkout, slowing down the page. Same other modules, autors do good modules but they sometime dont think the consequences.

Link to comment
Share on other sites

2 minutes ago, Daresh said:

A module hooked to the Header may be limited to only do it's job when the customer is on the checkout controller, it's built in.

I know how it works, but i think creators of the modules seems to forget it.

Link to comment
Share on other sites

But a module creator can only assume default controllers are present in the shop, not knowing about other controllers (like the ones from modules). So it's best in my opinion to optimize it manually for each specific situation.

Link to comment
Share on other sites

5 minutes ago, Daresh said:

But a module creator can only assume default controllers are present in the shop, not knowing about other controllers (like the ones from modules). So it's best in my opinion to optimize it manually for each specific situation.

I did, i disable loading the modules on index page if they don't needed there. Because they load some .js and .css slowing down main page

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...