Hello I am trying to figure out how to add a .js file to the main layout within Magneto I created my js file but can't seem to get it to load in the layout. Where do I need to include the <script>
tag in the main layout? I am using Magento ver 1.3.2.4
Asked
Active
Viewed 93 times
0
-
1I think this question is already answered [here](http://stackoverflow.com/questions/26093139/how-to-add-include-js-file-into-magento-theme) and [here](http://stackoverflow.com/questions/4654822/adding-external-javascript-file-to-magento). – gegillam Jan 12 '16 at 00:50
-
Magento 1.3.2.4? Time to update! – Gerard de Visser Jan 12 '16 at 09:02
1 Answers
0
You can add your .js file in page.xml file in your theme folder.
Put .js file in your theme package skin/frontend/theme_package/current_theme/js/.js file
add below line under <block type="page/html">
this block in page.xml
<action method="addItem"><type>skin_js</type><name>js/filename.js</name></action>

Dhaval Patel
- 1,076
- 6
- 19