app/code/local/Aoe/Layout/Controller/Model.php
public function indexAction()
    {
        if ($this->getRequest()->isAjax()) {
            try {
                $this->loadLayout(null, false, false);
                $this->getLayout()->getUpdate()->setCacheId(null);
                $this->getLayout()->getUpdate()->addHandle(strtolower($this->getFullActionName()) . '_AJAX');
            } catch (Exception $e) {
                Mage::logException($e);
                $this->getResponse()->setHeader('Content-Type', 'application/json');
                $this->getResponse()->setBody(Zend_Json::encode(['error' => true, 'message' => $e->getMessage()]));
            }
        }

        $this->loadLayout();
        $this->renderLayout();
    }
public function indexAction()
    {
        if ($this->getRequest()->isAjax()) {
            try {
                $this->loadLayout(null, false, false);
                $this->getLayout()->getUpdate()->setCacheId(null);
                $this->getLayout()->getUpdate()->addHandle(strtolower($this->getFullActionName()) . '_AJAX');
            } catch (Exception $e) {
                Mage::logException($e);
                $this->getResponse()->setHeader('Content-Type', 'application/json');
                $this->getResponse()->setBody(Zend_Json::encode(['error' => true, 'message' => $e->getMessage()]));
            }
        }

        $this->loadLayout();
        $this->renderLayout();
    }
public function indexAction ( ) { if ( $ this -> getRequest ( ) -> isAjax ( ) ) { try { $ this -> loadLayout ( null , false , false ) ; $ this -> getLayout ( ) -> getUpdate ( ) -> setCacheId ( null ) ; $ this -> getLayout ( ) -> getUpdate ( ) -> addHandle ( strtolower ( $ this -> getFullActionName ( ) ) . '_AJAX' ) ; } catch ( Exception $ e ) { Mage :: logException ( $ e ) ; $ this -> getResponse ( ) -> setHeader ( 'Content-Type' , 'application/json' ) ; $ this -> getResponse ( ) -> setBody ( Zend_Json :: encode ( [ 'error' => true , 'message' => $ e -> getMessage ( ) ] ) ) ; } } $ this -> loadLayout ( ) ; $ this -> renderLayout ( ) ; }
List existing records via a grid
List existing records via a grid