1

I am not able to figure out the problem as to why my layout page is not getting displayed.

my current status is that:-

  • controller is worrking, it gives output on the screen, so then i called layout

  • layout is not being displayed,

i had tried to invalidate my layout.xml file but then Magento loads the default layout, so i am not sure if my layout.xml file is being caleed or not or is there some problem with my blocks.....

So, i wanted to what is the standard approach when trying to debug this kind of problems?

For reference, below is my Controller, Config.xml, layout.xml and template.phtml files

url that i am calling is bhupenShop/index.php/customer/adminhtml_index/index/key/133b7f564dd974c7f29baf622648711b/

*controller file *

public function indexAction()
      {
            //echo "testing admin panel output .. ";
              $this->loadLayout();
              $this->renderLayout();
              //echo "testing admin";
      }

config.xml

<adminhtml>
          <layout>
              <updates>
                  <psl_customer>
                      <file>psl_customer.xml</file>
                   </psl_customer>
              </updates>
           </layout>

layout.xml stored in adminhtml/default/default/layout/psl_customer.xml

<?xml version="1.0" ?>
<layout version="0.1.0">
  <customer_adminhtml_index_index>
     <reference name="content">
             <!--block type="psl_customer/adminhtml_gridcontainer" name="customergrid" /-->
             <block type="core/template" name="testing" template="Pfay/UserForm/FormInput.phtml" />
                  <!--template="Pfay/UserForm/FormInput.phtml" /-->
      </reference>
   </customer_adminhtml_index_index>
</layout>

and template stored inside adminhtml\default\default\template\Pfay\UserForm\FormInput.phtml

<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>"  />


    <form action="<?php echo Mage::getUrl('userform/adminhtml/index/saveform') ?>" method="post">
        <fieldset>
        <legend>Enter the following details:</legend>

            Name: <input type="test" name="name" required/><p class='red'>*</p><br/>
            email_id: <input type="email" name="email" required/><p class='red'>*</p><br/>
            MobileNumber : <input  type="tel" name="mobile" required/><p class='red'>*</p><br/>
            Landline Number: <input  type="tel" name="landline" required/><p class='red'>*</p><br/>
            SkypeId : <input type="text" name="skype"/><br/>

        </fieldset>

        <input type="submit">Enter</submit>
    </form>

1 Answer 1

1

There are different solutions to see which layout handles and block are used:

It will help you to know which layout handle to use in your layout xml file

[EDIT] Info from the @user3151033 comment, Debugging steps:

  1. check the path of files
  2. check the spellings in the names of the files and the one defined by you in your config.xml
  3. check your handle names using the above tools (or) try with tag
  4. check the URI given for your block and check if your block is correctly defined or not and probably then evrything must be fine
1
  • would like to add this as debuggingsteps:- .1- check the path of files 2. check the spellings in the names of the files and the one defined by you in your config.xml 3. check your handle names using the above tools (or) try with <default> tag 4. check the URI given for your block and check if your block is correctly defined or not and probably then evrything must be fine Commented Jan 29, 2014 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.