コード例 #1
0
ファイル: news.php プロジェクト: uzura8/flockbird
 /**
  * News tag
  * 
  * @access  public
  * @return  Response
  */
 public function action_tag($tag_string = null)
 {
     $tags = \Site_Util::validate_tags($tag_string);
     if (!$tags || !($ids = \News\Model_NewsTag::get_news_ids4tags($tags))) {
         throw new \HttpNotFoundException();
     }
     list($limit, $page) = $this->common_get_pager_list_params();
     $data = Site_Model::get_list($limit, $page, \Auth::check(), null, $ids);
     $data['tag_string'] = implode(', ', $tags);
     $this->set_title_and_breadcrumbs(sprintf('%s: %s', term('site.tag'), implode(', ', $tags)), array('news/list' => term('site.latest', 'news.view', 'site.list')));
     $this->template->post_footer = \View::forge('_parts/list_footer');
     $this->template->content = \View::forge('_parts/list', $data);
     $this->template->content->set_safe('html_bodys', Site_Model::convert_raw_bodys($data['list']));
 }