I tried the both ways,
Method 1:
<reference name="head">
<action method="addItem">
<type>skin_js</type><name>js/myJs.js</name>
</action>
</reference>
The above gives default skin directory.
Method 2:
<reference name="head">
<action method="addJs"><script>myJs.js</script></action>
</reference>
The above gives js directory.
But I Need the file located like the below to add via block and reference head.
src Path: http://www.example.com/wp/folder1/folder2/script.js
Here the http://www.example.com
is store url.
How to implement this?
Best Answer
Try bellow way
Go admin side and add above code in CMS page in section
(Layout Update XML)