4 * Class Catalog controlls video hierarchy and searching
7 * @author Călin-Andrei Burloiu
9 class Catalog extends CI_Controller {
11 public function index()
13 // Retrieve videos summary.
14 $this->load->model('videos_model');
15 $data['videos'] = $this->videos_model->get_videos_summary();
17 $params = array( 'title' => $this->config->item('site_name'),
18 //'stylesheets' => array(),
19 //'javascripts' => array(),
20 //'metas' => array('description'=>'','keywords'=>'')
22 $this->load->library('html_head_params', $params);
23 $this->load->view('html_begin', $this->html_head_params);
24 $this->load->view('header');
26 $this->load->view('catalog/index_view', $data);
28 $this->load->view('footer');
29 $this->load->view('html_end');
32 public function test()
34 $this->load->helper('url');
36 echo '<a href="/">link</a>';
39 public function category($category_id)
41 // Retrieve videos summary.
42 $this->load->model('videos_model');
43 $data['videos'] = $this->videos_model->get_videos_summary($category_id);
44 $categories = $this->config->item('categories');
45 $data['category'] = $categories[$category_id];
46 $data['category_id'] = $category_id;
48 $params = array( 'title' => $this->config->item('site_name'),
49 'stylesheets' => array('catalog.css'),
50 //'javascripts' => array(),
51 //'metas' => array('description'=>'','keywords'=>'')
53 $this->load->library('html_head_params', $params);
54 $this->load->view('html_begin', $this->html_head_params);
55 $this->load->view('header');
57 $this->load->view('catalog/category_view', $data);
59 $this->load->view('footer');
60 $this->load->view('html_end');
63 public function search($query_str)
69 /* End of file catalog.php */
70 /* Location: ./application/controllers/catalog.php */