layout improved; About page completed
[living-lab-site.git] / application / controllers / article.php
1 <?php
2
3 /**
4  * Class Article typically controls static pages.
5  * Their content depends on the language.
6  *
7  * The page views are located in "application/views/article/$language/$method".
8  * Article's name can be set in language file 'article_lang.php' by using an
9  * entry named "article_$method". If not present "$method" is used as a name.
10  * Article meta description has the entry "article_$method_description"
11  *
12  * @category    Controller
13  * @author              Călin-Andrei Burloiu
14  */
15 class Article extends Article_Controller {
16
17         public function _remap($method, $params = array())
18         {
19                 // **
20                 // ** DATA
21                 // **
22                 $this->lang->load('article');
23                 $title = $this->lang->line("article_$method");
24                 if ($title == FALSE)
25                         $title = $method;
26                 $descr = $this->lang->line("article_${method}_description");
27                 if ($descr == FALSE)
28                         $descr = '';
29                 
30                 $html_params = array(   'title' => 
31                                                                 $title.' - '. $this->config->item('site_name'),
32                                                         'css' => array(
33                                                                 'jquery-ui.css'
34                                                                 ),
35                                                         //'js' => array(),
36                                                         'metas' => array('description'=>$descr)
37                                                         );
38                 $this->load->library('html_head_params', $html_params);
39
40                 // **
41                 // ** LOADING VIEWS
42                 // **
43                 $this->load->view('html_begin', $this->html_head_params);
44                 $this->load->view('header', array('selected_menu' => $method));
45                 
46                 $main_params['content'] = $this->_load($method, $params);
47                 // TODO side
48                 $main_params['side'] = '<h1>Side Box</h1><p>TODO: Put side box content here</p>';
49                 $this->load->view('main', $main_params); 
50                                 
51                 $this->load->view('footer');
52                 $this->load->view('html_end');
53         }
54 }
55
56 /* End of file article.php */
57 /* Location: ./application/controllers/article.php */