Попробуй так: Код (PHP): private function getCategory($id_category, $id_lang = false, $id_shop = false, $curDepth = 1) { $id_lang = $id_lang ? (int) $id_lang : (int) Context::getContext()->language->id; $category = new Category((int) $id_category, (int) $id_lang); if($category->level_depth > 1) $category_link = $category->getLink(); else $category_link = $this->context->link->getPageLink('index'); if(is_null($category->id)) return; $children = Category::getChildren((int) $id_category, (int) $id_lang, true, (int) $id_shop); $selected = ($this->page_name == 'category' && ((int) Tools::getValue('id_category') == $id_category)) ? ' class="sfHoverForce"' : ''; $is_intersected = array_intersect($category->getGroups(), $this->user_groups); // filter the categories that the user is allowed to see and browse if(!empty($is_intersected) and $curDepth < 3) { $this->_menu .= '<li class="alt1"' . $selected . '>'; $this->_menu .= '[url="' . $category_link . '"]name . '[/url]'; if(count($children)) { $this->_menu .= '<div class="st"></div><ul class="level2">'; foreach ($children as $child) $this->getCategory((int) $child['id_category'], (int) $id_lang, (int) $child['id_shop'], $curDepth + 1); $this->_menu .= '</ul>'; } $this->_menu .= '</li>'; } } Но вообще, никому не известно, как там всё устроено в твоей CMS...