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