Muller Posted July 19, 2011 Share Posted July 19, 2011 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 More sharing options...
Richard S Posted July 25, 2011 Share Posted July 25, 2011 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 More sharing options...
Muller Posted August 3, 2011 Author Share Posted August 3, 2011 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 More sharing options...
razaro Posted August 3, 2011 Share Posted August 3, 2011 But what if my module doesn't sit in the header hook? Do I still need to add the CSS there? If you use addCSS function you should also use header hook. Maybe this page will help - adding hooks. Link to comment Share on other sites More sharing options...
Muller Posted August 4, 2011 Author Share Posted August 4, 2011 Ok, I see. Thanks! Link to comment Share on other sites More sharing options...
Isa_314 Posted October 19, 2011 Share Posted October 19, 2011 If it is so, why blockadvertising doesn't use hookHeader() and I can see it at the right column but blockadvertising.css does not work? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now