public function preDispatch()
 {
     parent::preDispatch();
     $blockM = new Base_View_Block();
     $path = "/layouts/scripts/page/blocks/advice";
     $blocks = array("name" => "search-advice", "order" => "10", "path" => $path);
     $blockM->addBlock($blocks, 'advice');
     $blocks = array("name" => "right-banner", "order" => "9", "path" => $path);
     $blockM->addBlock($blocks, 'advice');
     $blocks = array("name" => "advice-categories", "order" => "7", "path" => $path);
     $blockM->addBlock($blocks, 'advice');
     $this->_helper->layout->setLayout('journal-layout-2column');
     //$this->_helper->layout->setLayout('advice-layout-2column');
 }
 public function preDispatch()
 {
     parent::preDispatch();
     $this->_helper->layout->setLayout('3column-my-account');
     $blockM = new Base_View_Block();
     $path = "/layouts/scripts/page/blocks/myaccount";
     $blocks = array("name" => "weather", "order" => "11", "path" => $path);
     $blockM->addBlock($blocks, 'myaccount');
     $blocks = array("name" => "time", "order" => "9", "path" => $path);
     $blockM->addBlock($blocks, 'myaccount');
     $blocks = array("name" => "adv", "order" => "8", "path" => $path);
     $blockM->addBlock($blocks, 'myaccount');
     $blocks = array("name" => "people", "order" => "7", "path" => $path);
     $blockM->addBlock($blocks, 'myaccount');
     $blocks = array("name" => "whats-going-on", "order" => "6", "path" => $path);
     $blockM->addBlock($blocks, 'myaccount');
     $blocks = array("name" => "journal", "order" => "5", "path" => $path);
     $blockM->addBlock($blocks, 'myaccount');
     $blocks = array("name" => "request", "order" => "7", "path" => $path);
     $blockM->addBlock($blocks, 'myaccount');
 }
 public function articleDetailAction()
 {
     //$this->_helper->viewRenderer->setNoRender(true);
     $blockM = new Base_View_Block();
     $path = "/layouts/scripts/page/blocks/work-study-volunteer";
     $blockM->removeBlock("work-study-volunteer-categories", 'work-study-volunteer');
     $params = $this->getRequest()->getParams();
     $article_id = $params['id'];
     $preview = false;
     $preview = $this->_getParam("preview");
     $categoryM = new Application_Model_Category();
     $articleM = new Application_Model_Articles();
     $data = $articleM->find($article_id);
     if (false != $data) {
         $this->view->article = $data;
         $this->view->preview = $preview;
         $this->view->categoryId = $categoryId = $data->getCategoryId();
         $this->view->categoryM = $categoryM->find($categoryId);
         $allarticles = $articleM->fetchAll("category_id = {$categoryId} and id != {$article_id}");
         /**
          * @Added By: Mahipal Adhikari
          * @Added On: 29-Dec-2010
          * @Description: get Article user information to display as Author
          */
         $userM = new Application_Model_User();
         $userRes = $userM->find($data->getUserId());
         $Author = "Admin";
         if (false !== $userRes) {
             $Author = $userRes->getFirstName() . " " . $userRes->getLastName();
             $this->view->author = $Author;
             $this->view->author_username = $userRes->getUsername();
         }
         if (count($allarticles) > 0) {
             $this->view->allarticles = $allarticles;
             $blocks = array("name" => "work-study-volunteer-articles", "order" => "8", "path" => $path);
             $blockM->addBlock($blocks, 'work-study-volunteer');
         }
     }
 }