/** * Gets title based on the view slug * * @return string */ public function getTitle() { try { $this->render(); return $this->get('title'); } catch (\OutOfBoundsException $ex) { $file = new \SplFileInfo($this->filename); return Application::slugToTitle($file->getBasename('.' . $file->getExtension())); } }
/** * Gets post title based on slug * * @return string */ public function title() { return Application::slugToTitle($this->slug); }