Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: None  |  size: 0.56 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. /* class for processing static pages */
  4.  
  5. class StaticController extends CommonController {
  6.  
  7.     public function init() {
  8.         parent::init();
  9.                
  10.         // turn off the default page rendering  
  11.         $this->getHelper('viewRenderer')->setNoRender();
  12.     }
  13.  
  14.  
  15.     /* parse a view and output the given template */
  16.     public function parseViewAction() {
  17.         $view = new Zend_View();
  18.         $view->setScriptPath( MODULES_PATH . '/default/views/static');
  19.  
  20.         // output a given page
  21.         echo $view->render( $this->_request->getParam( 'page').'.phtml');
  22.     }
  23.    
  24. }