private function generate_response() { $response = new SiteDisplayResponse($this->tpl); $graphical_environment = $response->get_graphical_environment(); $graphical_environment->set_page_title($this->get_keyword()->get_name(), $this->lang['news']); $graphical_environment->get_seo_meta_data()->set_description(StringVars::replace_vars($this->lang['news.seo.description.tag'], array('subject' => $this->get_keyword()->get_name()))); $graphical_environment->get_seo_meta_data()->set_canonical_url(NewsUrlBuilder::display_tag($this->get_keyword()->get_rewrited_name(), AppContext::get_request()->get_getint('page', 1))); $breadcrumb = $graphical_environment->get_breadcrumb(); $breadcrumb->add($this->lang['news'], NewsUrlBuilder::home()); $breadcrumb->add($this->get_keyword()->get_name(), NewsUrlBuilder::display_tag($this->get_keyword()->get_rewrited_name(), AppContext::get_request()->get_getint('page', 1))); return $response; }
private function build_keywords_view(News $news) { $keywords = $news->get_keywords(); $nbr_keywords = count($keywords); $this->tpl->put('C_KEYWORDS', $nbr_keywords > 0); $i = 1; foreach ($keywords as $keyword) { $this->tpl->assign_block_vars('keywords', array('C_SEPARATOR' => $i < $nbr_keywords, 'NAME' => $keyword->get_name(), 'URL' => NewsUrlBuilder::display_tag($keyword->get_rewrited_name())->rel())); $i++; } }