I am currently working on a Magento extension, and I have redefined the main controller, which works great.
Now I have added a new action for my controller. The problem is that whenever I invoke an action, a blank page is created. If I repeat something, it displays correctly.
So I dug up the core of the Customer module and controllers. I saw that methods like indexAction()implement the layout like this:
<?php
public function indexAction()
{
$this->loadLayout();
$this->_initLayoutMessages('customer/session');
$this->_initLayoutMessages('catalog/session');
$this->getLayout()->getBlock('content')->append(
$this->getLayout()->createBlock('customer/account_dashboard')
);
$this->getLayout()->getBlock('head')->setTitle($this->__('My Account'));
$this->renderLayout();
}
I transferred this to my action and the layout now displays correctly. Now to the question:
No matter what I enter the call ->createBlock('...'), nothing is displayed in the content area.
, , ?
xml /design/frontend/base/default/layout/myaddon.xml, .