0

I am creating custom module for practicing. app/code/local/Amactech/Events/etc/config.xml

<?xml version="1.0"?>
<config>

  <modules>
    <version>0.0.1</version>
  </modules>

  <global>

    <models>
      <events>
        <class>Amactech_Events_Model</class>
      </events>
    </models>

    <helpers>
      <events>
        <class>Amactech_Events_Helper</class>
      </events>
    </helpers>

    <blocks>
      <Amactech_Events>
        <class>Amactech_Events_Block</class>
      </Amactech_Events>
    </blocks>

  </global>

  <frontend>
    <routers>
      <events>
        <use>standard</use>
        <args>
          <frontName>events12</frontName>
          <module>Amactech_Events</module>
        </args>
      </events>
    </routers>

    <layout>
      <updates>
        <amactech_events>
          <file>events.xml</file>
        </amactech_events>
      </updates>
    </layout>

  </frontend>

</config>

app/design/frontend/base/default/layout/events.xml

<?xml version="1.0"?>
<layout version="0.1.0">
  <events_events12_index>
    <update handle="page_two_columns_left" />
  </events_events12_index>

</layout>

app/code/local/Amactech/Events/controllers/IndexController.php

<?php

    class Amactech_Events_IndexController extends Mage_Core_Controller_Front_Action{
        public function indexAction(){
      $this->loadLayout();
            return $this->renderLayout();
        }
    }

?>

So whatever whatever changes (whether right or wrong) are made into events.xml file does not reflect to frontend page. The second thing is in events.xml I defined page_two_columns_left but it is showing page with right column. It seems that config.xml file is not loading events.xml file

Can anyone point out that what I did wrong?

0

I think your handler should be

events12_index_index

Instead of

events_events12_index
  • I tried handler events12_index_index but still not working. – Ahmar Arshad Dec 27 '16 at 7:26
  • @AhmarArshad print_r($this->getLayout()->getUpdate()->getHandles()); add this code in your controller index action and see which handler its showing – Murtuza Zabuawala Dec 27 '16 at 8:18

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.