Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

getLayout(’content’)
 
alexbab
Jr. Member
 
Total Posts:  8
Joined:  2012-11-12
 

Hi i’m trying to make a static block show from my magento plugin.

I’m basically using a controller to create my block instance and insert it into the content core/textlist block

the command used by the controller is

$this->loadLayout();

$this->getLayout()
->getBlock(’content’)
->insert($myBlock);

$this->renderLayout();

the page loads fine but it is 3column, i’d like to show my static block in a 1column template how can I do this?

thank you for your replies.

Alex

 
Magento Community Magento Community
Magento Community
Magento Community
 
alexbab
Jr. Member
 
Total Posts:  8
Joined:  2012-11-12
 

Arg Solved sorry

$this->loadLayout();
        
        
$this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');
        
        
$this->getLayout()
             ->
getBlock('content')  
             ->
insert($block);
        
        
$this->renderLayout();
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top