0

my config.xml is

<?xml version="1.0"?>
  <config>
   <modules>
        <Octane_SMTP>
            <version>1.0.0</version>
        </Octane_SMTP>
   </modules>
    <frontend>
     .............
    </frontend>
    <admin>
     <routers>
         <SMTP>
            <use>admin</use>
            <args>
               <module>Octane_SMTP</module>
               <frontName>adminSMTP</frontName>
            </args>
        </SMTP>
    </routers>
 </admin>
 <adminhtml>
   <layout>
      <updates>
          <SMTP>
              <file>SMTP.xml</file>
          </SMTP>
      </updates>
   </layout>
   <menu>
      <SMTP translate="title" module="Adminhtml">
         <title>My plugins</title>
         <sort_order>100</sort_order>
         <children>
             <set_time>
                   <title>Address book</title>
                   <action>adminSMTP/adminhtml_index</action>
              </set_time>
          </children>
       </SMTP>
    </menu>
</adminhtml>
   <global>
     <blocks>
         <SMTP>
              <class>Octane_SMTP_Block</class>
         </SMTP>
      </blocks>
         <helpers>
              <SMTP>
                   <class>Octane_SMTP_Helper</class>
              </SMTP>
         </helpers>
<models>
 ..........

</global>
</config>

my layout file SMTP.xml which is located at app/design/adminhtml/default/default/layout

and controller file which is located at

app/code/local/Octane/SMTP/controllers/Adminhtml

class Octane_SMTP_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
    {
    public function indexAction()
          {
             echo"show something plz.....";
             $this->loadlayout();
             //$this->renderLayout();
          }
    }
1
  1. Dev mode on
  2. cache off
  3. Check whether the XML is loaded: make an error in it, reload, should throw an error
  4. make sure the layout handle is correct -> add

    $this->loadLayout();
    var_dump($this->getLayout()->getUpdates()->getHandles())
    

    to your controller

layout file looks good.

Layout handle should be: SMTP_index_index, node of your frontename, name of the controller, name of the action.

| improve this answer | |

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.