Search code examples
phpxmlmagentomagento-1.8mage

magento not reading JS directory


I have added the js files in

/skin/frontend/default/mytheme/js

and the local.xml file is in

/app/design/frontend/default/mytheme/layout

The code to add the js is

    <reference name="head">
        <!--CSS-->
        <action method="addItem"><type>skin_css</type><name>css/slicknav.css</name><params/></action>
        <action method="addItem"><type>skin_css</type><name>css/bootstrap.css</name><params/></action>
        <action method="addItem"><type>skin_css</type><name>css/bootstrap-responsive.css</name><params/></action>
        <action method="addItem"><type>skin_css</type><name>css/product-slider.css</name><params/></action>
        <action method="addItem"><type>skin_css</type><name>css/fb_style.css</name><params/></action>
        <action method="addItem"><type>skin_css</type><name>css/flexslider.css</name><params/></action>
        <action method="addItem"><type>skin_css</type><name>css/jquery.selectbox.css</name><params/></action>
        <action method="addItem"><type>skin_css</type><name>css/jquery.bxslider.css</name><params/></action>
        <action method="addItem"><type>skin_css</type><name>css/styles.css</name><params/></action>


        <!--JS-->
        <action method="addJs"><script>js/jquery-2.1.4.min.js</script></action>
        <action method="addJs"><script>js/no-conflict.js</script></action>
        <action method="addJs"><script>js/bootstrap.min.js</script></action>
        <action method="addJs"><script>js/jquery.easing.js</script></action>
        <action method="addJs"><script>js/jquery.selectbox-0.2.min.js</script></action>
        <action method="addJs"><script>js/jquery.mousewheel.pack.js</script></action>
        <action method="addJs"><script>js/jquery.elastislide.js</script></action>
        <action method="addJs"><script>jquery.flexslider.min.js</script></action>
        <action method="addJs"><script>js/jquery.tagsphere.min.js</script></action>
        <action method="addJs"><script>js/retina-replace.js</script></action>
        <action method="addJs"><script>js/retina-replace.js</script></action>
        <action method="addJs"><script>js/js/jquery.bxslider.js</script></action>
        <action method="addItem"><type>js</type><name>js/html5.js</name><params/><if>lte IE 8</if></action>
        <action method="addItem"><type>js</type><name>js/html5.js</name><params/><if>lt IE 9</if></action>
        <action method="addItem"><type>js</type><name>js/jquery.bxslider.js</name><params/><if>lt IE 9</if></action>
    </reference>

but, magento is not reading any of the above files. I don't know if it is conflicting with any other xml file or any other javascript directory.

Any help please as I have this projct to be submitted in a day or two and could not figure out what it might be


Solution

  • Try this structure:

    <action method="addItem"><type>skin_js</type><name>js/jquery-2.1.4.min.js</name></action>