I was working on a large module and I couldn't get an adminhtml layout XML file to load. So I created a new test module to isolate the issue and I still can't get the layout file to load.

I don't think my layout file is loading because if I turn on developer mode and mess up my config.xml or my adminhtml.xml then I get errors. But if I mess up the XML in my layout file then there are no errors.

Here's my config.xml:

#File: app/code/local/TestBlue/MeLayout/etc/config.xml

<?xml version="1.0"?>



Here's my adminhtml.xml:

#File: app/code/local/TestBlue/MeLayout/etc/adminhtml.xml

<?xml version="1.0"?>
                    <title>Me Layout</title>

Here's my controller:

#File: app/code/local/TestBlue/MeLayout/controllers/Adminhtml/IndexController.php


class TestBlue_MeLayout_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
    public function indexAction()

And here's the layout file that I don't think loads:

#File: app/design/frontend/mytheme/default/layout/testblue_melayout.xml

<?xml version="1.0"?>
<layout version="1.0.0">
        <reference name="before_body_end">
            <block type="core/template" template="file.phtml"/>

Everything here works properly except I don't think that layout file at the bottom of my config.xml loads. In other words, if I click the new admin menu item under sales then I properly hit that indexAction() in the controller. But of course that page is blank and I want to put content there by using a layout file so that I can specify a .phtml file for that route but again I don't think the layout file is loading.

The layout file code that I put above is a copy of another layout file in the same directory that is currently successfully loading for a different module on the frontend(ie. the public facing site).

So how can I troubleshoot why this layout file isn't loading?

All I really want to do is put some content on this new admin route page. If I can't figure out this layout file loading issue, then what are some other options for displaying content on the page? Can I assign HTML to the layout right inside indexAction()?

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.