0

I'm trying to add external css and javascripts to my magento website. What I basically did was to put the necessary scripts in their respective directories, then add this code to the page.xml of both the default and my current theme in app/design/frontend:

            <action method="addJs"><script>foundation/modernizr.js</script></action>
            <action method="addJs"><script>foundation/jquery.js</script></action>
            <action method="addJs"><script>foundation/foundation.min.js</script></action>


            <action method="addCss"><stylesheet>css/foundation.css</stylesheet></action>
            <action method="addCss"><stylesheet>css/style.css</stylesheet></action>
            <action method="addCss"><stylesheet>css/flexslider.css</stylesheet></action>
            <action method="addCss"><stylesheet>css/main.css</stylesheet></action>

But it seems that it's not showing on the head tag on every page I have. What else have I missed that makes the loading not possible?

I'm using Magento ver. 1.8.1.0.

marchemike
  • 3,179
  • 13
  • 53
  • 96
  • 1
    "Adding external JavaScript file to Magento" -> http://stackoverflow.com/questions/4654822/adding-external-javascript-file-to-magento – Will Feb 11 '14 at 03:47

1 Answers1

1

you can try like below just put your js in yourapplication/js/foundation

And you can add xml code to your local or your any design xml file like

<reference name="head">
   <action method="addJs"><script>foundation/modernizr.js</script></action>
   <action method="addJs"><script>foundation/jquery.js</script></action>
   <action method="addJs"><script>foundation/foundation.min.js</script></action>
 </reference>

but you should have to maintain loading sequence in proper way.

hope this will sure help you.

liyakat
  • 11,825
  • 2
  • 40
  • 46