Jump to content

[Solved] How to only load module assets on pages where module is actually used?


defuzed
 Share

Recommended Posts

Hi guys, I created a few modules that i use on different areas around the shop and was wondering if it is possible to only load the module's assets (css and js files) if the module's template files are also hooked?

 

I guess creating a custom hook in footer and header would work, but maybe there is a simpler solution?

Edited by defuzed (see edit history)

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More