cancel
Showing results for 
Search instead for 
Did you mean: 

addJs and addItem

addJs and addItem

What is the difference between these 2 lines ??

 

What will they produce ??

 

Thanks

 

 

<action method="addJs"><script>prototype/prototype.js</script></action>

 

 

<action method="addItem"><type>skin_js</type><name>prototype/prototype.js</name></action>

 

 

 

1 REPLY

Re: addJs and addItem

First one will attempt to load /js/prototype/prototype.js

 

Second one will try /skin/frontend/{package}/{theme]/js/prototype/prototype.js instead (and if not successful will try fail-overs). {package} and {theme} are the names your theme package and the theme itself.

Tanel Raja