public function categoryAction()
 {
     $this->_helper->layout()->setLayout('redesign-2014-page');
     $products = new Model_Products();
     $site = new Model_Site();
     $categories = new Model_Categories();
     $category_id = $this->_getParam('cid');
     //build category tree sidebar items
     $explode_category_id = explode("-", $category_id);
     $parent_category_name = $categories->getParentCategory($explode_category_id[0] . '-0-0');
     $subParents = $categories->getSubParents($explode_category_id[0] . '-0-0');
     //getSubParents
     foreach ($subParents as $subparent_key => $subparent_value) {
         $subparent_value['thirdLevel'] = $categories->getCategoryChildren($explode_category_id[0] . '-0-0', $subparent_value['SubParentID']);
         $category_tree[$subparent_key] = $subparent_value;
     }
     $this->view->category_tree = $category_tree;
     if ($explode_category_id[1] != '0') {
         $this->view->is_child_category = 1;
     }
     $this->view->active_category = $explode_category_id[0] . '-0-0';
     //$parent_category_name = 'category '.strtolower($parent_category_name[0]['Name']); //used as body class
     $parent_category_name = strtolower($parent_category_name[0]['Name']);
     //used as body class
     $this->view->parent_category_name = $parent_category_name;
     $this->view->site_title = $parent_category_name;
     $this->view->pagetype = 'category';
     $items = $explode_category_id[1] != '0' ? $this->paginator($products->ListProducts("", $category_id, null, null, 0)) : $products->ListProducts("", $category_id);
     //where 2 is the category id
     $this->view->items = $items;
     $banners = new Model_Banners();
     $this->view->banners = $banners->listBannersByTag($parent_category_name);
     $this->render('brands');
 }