Skip to content

Instantly share code, notes, and snippets.

@aneesahmadweb
Created October 14, 2016 22:27
Show Gist options
  • Save aneesahmadweb/d218f59b38498bbbcc85d4bcd8c5f545 to your computer and use it in GitHub Desktop.
Save aneesahmadweb/d218f59b38498bbbcc85d4bcd8c5f545 to your computer and use it in GitHub Desktop.
mygitst
<?php
class AW_Blog_MyController extends Mage_Core_Controller_Front_Action
{
public function preDispatch(){
$this->loadLayout();
echo $this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');
$this->renderLayout();
if(!Mage::helper('blog')->getEnabled()== '2'){
Mage::getSingleton("core/session")->addError("Some error message"); }
}
public function IndexAction(){
$this->loadLayout();
echo Mage::helper('blog')->getEnabled();
$this->renderLayout();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment