public function action_page() { $model = MPage::app(); $url = implode('/', $this->params); $page = $model->getByUrl($url); if ($page == null) { throw new Ex404(); /*$this->action_p404(); return;*/ } $this->title = $page['title']; $this->base_template = $page['base_template']; $this->content = View::template('inner_templates/' . $page['inner_template'], ['page' => $page]); }
public function __construct() { parent::__construct(); $this->model = MPage::app(); $this->check_access('edit_pages'); }