setTemplate('page.view', 'site'); $this->setKey('page-view'); $this->withSeoSettings('page-view', 'site'); $this->setTitle(_t('@site', 'Content Pages')); $this->useBreadcrumbs(); } public function handle($filename) { $this->fileName = $filename; } public function data() { $data = Site::model()->pageDataView($this->fileName); if (empty($data)) { return $this->errors->error404(); } $data = array_merge($data, parent::data()); $this->breadcrumbs->add($data['title']); return $data; } public function seo() { $this->request->urlCorrection($this->router->url('page', ['filename' => $this->fileName])); $this->seo->canonicalUrl($this->router->url('page', ['filename' => $this->fileName], ['dynamic' => true])); $this->seo->with('title', $this->data['title']); $this->seoApply(); if (! empty($this->data['noindex'])) { $this->seo->index(false); } } public function seoSettings() { $this->seo ->placeholder('title', _t('@site', 'Page Title')) ->inheritance(); } }