0

I am using the tutorial here http://alanstorm.com/layouts_blocks_and_templates which outlines out to create a new blank admin page with a link in the nav bar.

That all works good and fine. However I am now trying to make a phtml page for all the html content instead of just having a blank page.

However what is happening is I am still getting the blank page. I see the admin header/nav and footer of the admin panel but no middle content.

Below is my code app/code/community/Pulsestorm/Adminhello/etc/config.xml

  <?xml version="1.0"?>
<config>
<modules>
    <Pulsestorm_Adminhello>
        <version>1.0.0</version>
    </Pulsestorm_Adminhello>
</modules>
    <admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <Pulsestorm_Adminhello after="Mage_Adminhtml">Pulsestorm_Adminhello</Pulsestorm_Adminhello>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

<global>
    <helpers>
        <pulsestorm_adminhello>
            <class>Pulsestorm_Adminhello_Helper</class>
        </pulsestorm_adminhello>
    </helpers>
</global>

<adminhtml>
    <layout>
        <updates>
            <adminhello>
                <file>samplecustomerslist.xml</file>
            </adminhello>
        </updates>
    </layout>
</adminhtml>
</config>

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

  <?xml version="1.0" encoding="utf-8"?>
  <adminhtml_adminhello_index>
      <block type="core/template" output="toHtml" name="templateBlock" template="template/samplerequests/samples_customer_listing.phtml">
  </adminhtml_adminhello_index>

I then have a phtml file that just says hello world which is located at app/design/adminhtml/default/default/template/samplerequests/samples_customer_listing.phtml

So what am I missing?

What should my config.xml look like? Below is my full config.xml which does not seem to make my phtml file load.

<?xml version="1.0"?>
<config>
  <modules>
     <Pulsestorm_Adminhello>
        <version>1.0.0</version>
     </Pulsestorm_Adminhello>
 </modules>
 <admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <Pulsestorm_Adminhello after="Mage_Adminhtml">Pulsestorm_Adminhello</Pulsestorm_Adminhello>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

<global>
    <helpers>
        <pulsestorm_adminhello>
            <class>Pulsestorm_Adminhello_Helper</class>
        </pulsestorm_adminhello>
    </helpers>
</global>

<adminhtml>
   <layout>
        <updates>
            <pulsestorm_adminhello module="pulsestorm_adminhello">
                <file>samplecustomerslist.xml</file>
            </pulsestorm_adminhello>
        </updates>
    </layout>
</adminhtml>
</config>
1

You need to tell magento to load your layout.xml file from config.xml.

Try this:

<config>
   ........
   <adminhtml>
       <layout>
            <updates>
                <pulsestorm_adminhello module="pulsestorm_adminhello">
                    <file>samplecustomerslist.xml</file>
                </pulsestorm_adminhello>
            </updates>
        </layout>
   </adminhtml>
   ......
</config>

Now clear your cache.

Hope this will help.

0

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.