Change page layout from controller in Magento
Just you need to replace one line of code in your controller
where you want to change the layout of the page if you are not
able to do from xml through setlayout.
Replace
$this->loadLayout();
with
$this->loadLayout()->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');
Just you need to replace one line of code in your controller
where you want to change the layout of the page if you are not
able to do from xml through setlayout.
Replace
$this->loadLayout();
with
$this->loadLayout()->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');
Great website...and cool article man...thanx for the great post...keep on posting such articles..
ReplyDeletePHP 5 developer
Nice blog ,looking forward for more articles .
ReplyDeleteMagento Developers
The blog posted is very interesting from all aspects and it will surely benefit the readers by all means.
ReplyDeleteMagento Developers
I learn some new stuff from it too, thanks for sharing your information.
ReplyDeletehttp://newizze.com/
Very interesting blog about multi store in Magento.Thanks for sharing
ReplyDeleteOutsource magento ecommerce development services
Custom ecommerce development services
steroid satın al
ReplyDeleteheets
ENAM