Magento custom admin module is blank

左心房为你撑大大i 提交于 2019-12-05 07:03:28

The $this->_addContent method on an admin controller expects to be passed a block object.

protected function _addContent(Mage_Core_Block_Abstract $block)
{
    $this->getLayout()->getBlock('content')->append($block);
    return $this;
}

You're passing in

$this->getLayout()->createBlock('adminhtml/template')->setTemplate('uhmaadmin/contactos.list.phtml')->toHtml()

which is a string. You're rendering it too soon. If you check your logs you should see a warning/error/something telling you that the argument to _addContent is an unexpected type.

Try it without the toHtml method call

$this->_addContent($this->getLayout()->createBlock('adminhtml/template')->setTemplate('uhmaadmin/contactos.list.phtml'));
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!