Display a block in Magento Admin Panel -


i getting error below

recoverable error: argument 1 passed mage_adminhtml_controller_action::_addcontent() must instance of mage_core_block_abstract, boolean given, 

my indexaction code below

public function indexaction()     {         // instantiate grid container         $brandblock = $this->getlayout()             ->createblock('digitech_brandlogo_adminhtml/brandlogo');          // add grid container item on page         $this->loadlayout()             ->_addcontent($brandblock)             ->renderlayout();     } 

in case question mean "

$brandblock = $this->getlayout()                 ->createblock('digitech_brandlogo_adminhtml/brandlogo'); 

" ??

i know block , layout structure/arrangement this.

sorry late answer may 1 helps else can use code, please replace "my_block_name_here" , "activecodeline/developer.phtml" block name , template path

public function indexaction() { //get current layout state $this->loadlayout();  $block = $this->getlayout()->createblock( 'mage_core_block_template', 'my_block_name_here', array('template' => 'activecodeline/developer.phtml') );  $this->getlayout()->getblock('content')->append($block);  $this->renderlayout(); } 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -