function view() { $model = JSFactory::getModel('contentPage', 'jshop'); $page = JRequest::getVar('page'); $order_id = JRequest::getInt('order_id'); $cartp = JRequest::getInt('cart'); $seodata = JshopHelpersMetadata::content($page); $model->setSeodata($seodata); $text = $model->load($page, $order_id, $cartp); if ($text === false) { JError::raiseError(404, $model->getError()); return 0; } $view = $this->getView("content"); $view->setLayout("content"); $view->assign('text', $text); JDispatcher::getInstance()->trigger('onBeforeDisplayContentView', array(&$view)); $view->display(); }