How to add JS/CSS files to Joomla modules?

Posted by Apache Fan on Stack Overflow See other posts from Stack Overflow or by Apache Fan
Published on 2011-11-03T22:24:08Z Indexed on 2012/11/25 23:05 UTC
Read the original article Hit count: 160

Filed under:

I am starting out with Joomla and am writing a simple Joomla module. I am using some custom CSS and JS in my module. Now when I distribute this module I need my JS/CSS files to go with the ZIP. I have added my files in my module ZIP file.

This is what i need to know -

  1. How do I refer to these CSS/JS files in my module so that even if I distribute the module as a zip i would not have to send the css/js files separately?

  2. I tried looking at different solutions including http://www.howtojoomla.net/how-tos/development/how-to-add-cssjavascript-to-your-joomla-extension But I was not able to figure out what the URL for the JS/CSS file should be?

I am using Joomla 1.7 hosted on a cloud hosting site.

Thanks

© Stack Overflow or respective owner

Related posts about joomla