Subversion-Projekte lars-tiefland.ci

Revision

Revision 594 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
71 lars 1
<?php
2
 
316 lars 3
/**
4
 * @author Lars Tiefland
5
 * @copyright 2016
6
 */
71 lars 7
 
520 lars 8
/**
9
 * Category
10
 *
11
 * Übersicht über Unterkategorien und deren Artikel
12
 *
525 lars 13
 * @package WebanOS CI
14
 * @author Lars Tiefland
15
 * @copyright 2016
16
 * @version $Id: Category.php 594 2016-09-17 12:48:38Z lars $
520 lars 17
 * @access public
18
 */
316 lars 19
class Category extends CI_Controller
20
{
71 lars 21
 
520 lars 22
	/**
23
	 * Category::__construct()
24
	 *
25
	 * @return
26
	 */
316 lars 27
	public function __construct()
28
	{
29
		parent::__construct();
30
		$this->load->model('category_model', 'category');
31
		if (ENVIRONMENT == "production")
32
		{
33
			$this->output->cache(120);
34
		}
35
	}
520 lars 36
	/**
37
	 * Category::view()
38
	 *
39
	 * @param mixed $id
40
	 * @return
41
	 */
316 lars 42
	public function view($id)
43
	{
593 lars 44
		$start = 0;
45
		if ($this->input->get('per_page'))
594 lars 46
		{
47
			$start = $this->input->get('per_page');
48
		}
593 lars 49
		$data["subdir"] = $this->category->get_dir_items($id, $start, 40);
506 lars 50
		$this->smarty->assign('title', $data['subdir']['Name'].' - '.$GLOBALS['INI']['titel_only']);
316 lars 51
		$this->smarty->assign('artstaemmeItems', $data['subdir']['artstaemmeItems']);
52
		if ($data['subdir']['template_folder'])
53
		{
54
			$this->smarty->template_dir = array(
55
				APPPATH."views/templates/".$data['subdir']['template_folder'],
56
				$this->smarty->template_dir,
57
				);
58
		}
59
		$this->smarty->assign('shopPosition', $data['subdir']['shopPosition']);
60
		$this->smarty->view('subdir.tpl', $data);
61
	}
62
}
63
 
71 lars 64
?>