Jump to content

Tools::addCSS doesn't work when leaving only footer hook


Recommended Posts

Hiya,

I've created a simple module that displays footer links, and it is obviously hooked to the footer.

I have a css page in /themes/mytheme/modules/mymodule/blah.css.

By default my module hooks to left, right, top and footer. If I leave it like this I see the module's content 4 times and the css is working. If I remove the left, right and top hook, the module is only shown in the footer, BUT it's css doesn't work! I let my site load and hit view source on the main page, and the css is not even loaded.

Any ideas why this happens?!

Link to comment
Share on other sites

In my opinion, you should hold your CSS files with module files, so not in themes/modules/..., but in modules/your_module/css/... and this helps to prevent some minor bugs or errors that you face. Also do you add your CSS files to the header hook?

Link to comment
Share on other sites

  • 2 weeks later...

In my opinion, you should hold your CSS files with module files, so not in themes/modules/..., but in modules/your_module/css/... and this helps to prevent some minor bugs or errors that you face. Also do you add your CSS files to the header hook?

 

But what if my module doesn't sit in the header hook?

 

Do I still need to add the CSS there?

Link to comment
Share on other sites

  • 2 months later...

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