Im currently trying to simply add a block to a custom Adminhtml module. i am able to display the content of the block but it renders right at the top of the page with a grey background, and then the standard magento layout with the design and menu renders directly underneath it.
im trying to do things in the correct fashion as to learn best practises and am following books and tutorials as well as the magento core but so far have been unable to add content correctly.
so far i have :
public function indexAction()
{
$this->loadLayout();
$this->_setTitle();
$main_block = new Invent_General_Block_Info();
echo $main_block->toHtml();
//$this->_addContent($main_block);
$this->renderLayout();
i can see the general way to do so in the Mage Core would be something like
/**
* Append customers block to content
*/
$this->_addContent(
$this->getLayout()->createBlock('adminhtml/customer', 'customer')
);
since i have already created the block $main_block it doesnt make sense to me to ->createBlock and so im not sure what to do from here.
any assistance is appreciated as usual. thanks!