/** * Fill in default values for our properties before rendering the output. */ public function after() { parent::after(); if ($this->auto_render === TRUE) { // Add defaults to template variables. $this->template->styles = array_merge_recursive(Theme::$styles, $this->template->styles); $this->template->scripts = array_reverse(array_merge_recursive(Theme::$scripts, $this->template->scripts)); if ($this->template->title != '') { $concat = ' - '; } else { $concat = ''; } $this->template->title .= $concat . core::config('general.site_name'); //auto generate keywords and description from content $seo = new seo($this->template->meta_description, Kohana::$charset); if ($this->template->meta_keywords == '') { $this->template->meta_keywords = $seo->getKeyWords(12); } $this->template->meta_description = $seo->getMetaDescription(150); //die($this->template->meta_description); } $this->response->body($this->template->render()); }