Subversion-Projekte lars-tiefland.ci

Revision

Revision 506 | Revision 525 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<?php

/**
 * @author Lars Tiefland
 * @copyright 2016
 */

/**
 * Category
 * 
 * Übersicht über Unterkategorien und deren Artikel
 * 
 * @package   
 * @author WebanOS CI
 * @copyright Lars Tiefland
 * @version 2016
 * @access public
 */
class Category extends CI_Controller
{

        /**
         * Category::__construct()
         * 
         * @return
         */
        public function __construct()
        {
                parent::__construct();
                $this->load->model('category_model', 'category');
                if (ENVIRONMENT == "production")
                {
                        $this->output->cache(120);
                }
        }
        /**
         * Category::view()
         * 
         * @param mixed $id
         * @return
         */
        public function view($id)
        {
                $data["subdir"] = $this->category->get_dir_items($id);
                $this->smarty->assign('title', $data['subdir']['Name'].' - '.$GLOBALS['INI']['titel_only']);
                $this->smarty->assign('artstaemmeItems', $data['subdir']['artstaemmeItems']);
                if ($data['subdir']['template_folder'])
                {
                        $this->smarty->template_dir = array(
                                APPPATH."views/templates/".$data['subdir']['template_folder'],
                                $this->smarty->template_dir,
                                );
                }
                $this->smarty->assign('shopPosition', $data['subdir']['shopPosition']);
                $this->smarty->view('subdir.tpl', $data);
        }
}

?>