0

My controller works fine but when i am including layout (i.e loadLayout and renderLayout()) magento displays a blank page with default layout

Is there a way to know which all Layout.xml file's have been called or specifically if my Layout is called or not

and if it is called then why isn't my template being displayed.... where does the Problem exist Is there any way or tool to find that out Since every time when i get such problems , i cannot keep posting questions to figure the answer out..

  • can you post your layout.xml ? – Keyur Shah Jan 23 '14 at 9:00
  • The easiest way to test if the layout is loaded is to enable developer mode and make the layout file invalid. If you see an error on the screen then the layout file is loaded. – Marius Jan 23 '14 at 9:00
  • @Marius looks like a valid answer. Why not to post it? ;-) – user487772 Jan 23 '14 at 9:01
  • Hi @Marius, please post your comment as answer along with a link of any tutorial that explains enabling developer mode – user3151033 Jan 23 '14 at 9:07
0

The easiest way to test if the layout is loaded is to enable developer mode and make the layout file invalid. If you see an error on the screen then the layout file is loaded.
To enable developer mode add this to the httpd.conf of your apache (or corresponding file for other servers), or in the .htaccess file. Just remember not to move it on the live server:

SetEnv MAGE_IS_DEVELOPER_MODE 1

If you don't have access to these files you can just temporarily change this code in index.php

if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
}

to

//if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
//}

Again, remember not to leave it like this on the live server.

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.