I am a Magento newbie and today I am trying to apply Slick Slider to my Magento website as a custom module.
I have created a blank module with some simple 'echo' and HTML and they all worked well. However, I don't know what to do with the Slick directory. Should I put it in the website root directory or somewhere? And after that, how can I apply those Js and Css into my module?
Please provide some guidance
Best Answer
As per Magento best practices, you should put this slider folder under
skin
directory. However puting this underlib
folder is also fine and will work. But I recommendskin
directory.So put your css js files in
skin\frontend\[package]\[theme]\slick_slider\*
Next step is to define layout update xml file inside your module. For this add this snippet inside your module's
config.xml
file.Now use your this file to add slider specific files (css and js) to head section
File :
app\design\frontend\[package]\[theme]\layout\{namespace_module.xml}
Now put html and script specific for the slider in any one of the template file of your module.
Hope that helps