0

I have a module with below details, for some reason layout xml files does not load. I can make this out, because the js and css mentioned in the layout files are not getting loaded.

/var/www/html/ciaot/app/etc/modules/dw_categoryslider.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Dw_Categoryslider>
            <active>true</active>
            <codePool>community</codePool>
            <depends>
                <Mage_Core/>
            </depends>
        </Dw_Categoryslider>
    </modules>
</config>

/var/www/html/ciaot/app/code/community/Dw/Categoryslider/etc/config.xml

<?xml version="1.0"?>
<config>
 <modules>
  <Dw_Categoryslider>
   <version>0.1.0</version>
  </Dw_Categoryslider>
 </modules>
 <frontend>
  <routers>
   <categoryslider>
     <use>standard</use>
      <args>
       <module>Dw_Categoryslider</module>
       <frontName>categoryslider</frontName>
      </args>
    </categoryslider>
  </routers>
 <layout>
    <updates>
     <categoryslider>
      <file>dw_categoryslider.xml</file>
     </categoryslider>
    </updates>
 </layout>
 </frontend>
 <global>
  <models>
    <categoryslider>
     <class>Dw_Categoryslider_Model</class>
     <resourceModel>categoryslider_mysql4</resourceModel>
    </categoryslider>
    <categoryslider_mysql4>
     <class>Company_Web_Model_Mysql4</class>
     <entities>
     <categoryslider>
     <table>categoryslider</table>
     </categoryslider>
     </entities>
    </categoryslider_mysql4>
 </models>
 <resources>
   <categoryslider_setup>
    <setup>
     <module>Dw_Categoryslider</module>
    </setup>
    <connection>
     <use>core_setup</use>
    </connection>
   </categoryslider_setup>
 <categoryslider_write>
    <connection>
     <use>core_write</use>
    </connection>
 </categoryslider_write>
 <categoryslider_read>
   <connection>
    <use>core_read</use>
   </connection>
 </categoryslider_read>
 </resources>
 <blocks>
  <categoryslider>
    <class>Dw_Categoryslider_Block</class>
   </categoryslider>
 </blocks>
 <helpers>
  <categoryslider>
   <class>Dw_Categoryslider_Helper</class>
  </categoryslider>
 </helpers>
 </global>

</config>

/var/www/html/ciaot/app/design/frontend/base/default/layout/dw_categoryslider.xml

<?xml version="1.0"?>
<layout version="0.1.0">

  <categoryslider_index_index>

    <reference name="head">
        <!-- include Bx Slider -->
            <!--<action method="addJs"><script>bxslider/jquery.bxslider.js</script></action> -->
            <action method="addJs"><script>bxslider/jquery.bxslider.min.js</script></action>
            <action method="addItem"><type>js_css</type><name>bxslider/jquery.bxslider.css</name></action>
        </reference>

    <reference name="root">
      <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>
    <reference name="content">
      <block type="dw_categoryslider/categoryslider" name="categoryslider" template="categoryslider/categoryslider.phtml" />
    </reference>
  </categoryslider_index_index>
</layout>
  • what u r controller and action name? – Amit Bera Sep 22 '16 at 18:20
  • Did you use any theme ? – Krishna ijjada Sep 22 '16 at 18:20
  • @Amit sorry if my question sounds dumb, please excuse. Is the controller required for a simple module which has only a block which is of importance? – Rakshith S Kumar Sep 22 '16 at 18:24
  • @krishna yes i am using a custom theme. Should i place the layout in my themes folder? Doesn't the fallback model apply for layouts? – Rakshith S Kumar Sep 22 '16 at 18:25
  • 1
    @krishna thanks for making me understand. I am asking the wrong question. the js and css are there on this page. I will have to learn to create a custom module once again, to get my understanding straight. – Rakshith S Kumar Sep 22 '16 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.