Saturday, March 24, 2012

Magento : Set Custom Theme in Controller for a particular Page

  Magento : Set Custom Theme in Controller
Open the corresponding controller and the action in that controller from where the layout is loaded.
Put the below code and you shall see your custom theme applied on that particular page.
public function indexAction() //It can be any action from where your layout is called
   {
          ..
          ..
              Mage::getDesign()->setTheme('Your theme name');   /* This is the code you need to put */               
               $this->loadLayout();                        
               $this->renderLayout();

       }

1 comment:

  1. Hello,

    Thanks for the compliment I am glad you like to the comments. I really.I wish u keep on giving some new strategies. Appreciate your work, keep it up...

    ReplyDelete