addItem js_css explanation - Magento 1.9
-
07-10-2020 - |
Pregunta
To add some css or js file, Magento allow different ways to do that via xml:
Add CSS file:
1- <action method="addItem"><type>skin_css</type><name>css/custom.css</name></action>
2- <action method="addCss"><stylesheet>css/custom.css</stylesheet></action>
3- <action method="addItem"><type>js_css</type><name>folder/custom.css</name></action>
Add JS file:
4- <action method="addItem"><type>skin_js</type><name>js/custom.js</name></action>
5- <action method="addJs"><script>folder/custom.js</script></action>
Now my question is:
In the line 3 what is js_css ? from what I understood, it is to add css but why we don't add it in css/
file with all files css skin/frontend/package/theme/css/
instead of js/
Solución
This is for JavaScript libraries that bundle their CSS together like many sliders/scrollers do. For example slick (https://github.com/kenwheeler/slick).
Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange