cancel
Showing results for 
Search instead for 
Did you mean: 

Layout of a custom module isn't called in admin

SOLVED
   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Layout of a custom module isn't called in admin

Hello,

 

I've created a module which is working fine. This module allows visitor to get a custom quotation. Datas are saved in database. Now, i want to allow my boss to retrieve datas in admin. 3 hours I'm trying, reading all of possible tutos. My phtml file isn't called.

So, i have :

app/local/Mathieu/Devis/etc/config.xml (part for admin)

<admin>
    <routers>
        <devis>
            <use>admin</use>
            <args>
                <module>Mathieu_Devis</module>
                <frontName>devis</frontName>
            </args>
        </devis>
    </routers>
</admin>

app/local/myname/devis/controllers/Adminhtml/Devis.php

class Mathieu_Devis_Adminhtml_DevisController extends Mage_Adminhtml_Controller_Action
{    

    public function indexAction() {    

        $this->loadLayout()
        ->_setActiveMenu('devis')
        ->_title($this->__('Devis'));
        $this->renderLayout();
    }
}

app/local/myname/devis/etc/adminhtml.xml

<config>
    <menu>
        <devis module="devis">
            <title>Devis</title>
            <sort_order>25</sort_order>
            <children>                
                <items module="devis">
                    <title>Devis</title>
                    <sort_order>0</sort_order>
                    <action>devis/adminhtml_devis</action>
                </items>
            </children>
        </devis>
    </menu>
    <layout>
        <updates>
            <devis>
                <file>devis.xml</file>
            </devis>
        </updates>
    </layout>
</config>

app/design/adminhtml/default/default/layout/devis.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <devis_adminhtml_devis_index>
        <reference name="content">
            <block type="devis/adminhtml_devis" name="devis" template="devis/devis.phtml" />
        </reference>
    </devis_adminhtml_devis_index>
</layout>

and a simple phtml file in app/design/adminhtml/default/default/devis/devis.html with an H2

 

When i put this in controller Zend_Debug::dump($this->getLayout()->getUpdate()->getHandles());

 

array(4) {
  [0] => string(7) "default"
  [1] => string(11) "STORE_admin"
  [2] => string(35) "THEME_adminhtml_default_manutention"
  [3] => string(27) "devis_adminhtml_devis_index"

Thanks for all

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Layout of a custom module isn't called in admin

Hi @Anonymous

 

I suggest you to create a grid for displaying the information into admin like product, custom etc.

Was my answer helpful? You can Click Kudos/Accept As Solution.
200+ professional extensions for M1 & M2 with free lifetime updates!

View solution in original post

5 REPLIES 5

Re: Layout of a custom module isn't called in admin

Hi @Anonymous

 

I suggest you to create a grid for displaying the information into admin like product, custom etc.

Was my answer helpful? You can Click Kudos/Accept As Solution.
200+ professional extensions for M1 & M2 with free lifetime updates!

Re: Layout of a custom module isn't called in admin

Hello,

 

Sorry for late.

 

Hum do you know a website which can help me to do that ? Or do you know how to do ?

Re: Layout of a custom module isn't called in admin

So you have your block created?

Re: Layout of a custom module isn't called in admin

Hey,

 

Yes but the file is empty. I don't know what i'm supposed to put in this file. 

I have a controller with an index action, a config.xml and adminhtml, and a layout. 

Re: Layout of a custom module isn't called in admin

It's ok for me. I found a website which explains how to create custom grid and now i see my list.

 

Thanks for all