Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* class for processing static pages */
- class StaticController extends CommonController {
- public function init() {
- parent::init();
- // turn off the default page rendering
- $this->getHelper('viewRenderer')->setNoRender();
- }
- /* parse a view and output the given template */
- public function parseViewAction() {
- $view = new Zend_View();
- $view->setScriptPath( MODULES_PATH . '/default/views/static');
- // output a given page
- echo $view->render( $this->_request->getParam( 'page').'.phtml');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment