Exemple #1
0
 public function action_index()
 {
     $category_id = $this->request->param('id');
     if (empty($category_id)) {
         throw new Exception("Category ID must not be empty!");
     }
     $topic = new Model_Topic();
     $category = new Model_Category();
     $view = View::factory('categories/main');
     $view->topics = $topic->get_topics_by_id($category_id);
     $view->category = $category->get_name($category_id);
     $this->template->content = $view->render();
 }