usels/menu.xml<selection>
<target result="pages">
<type id="3" />
<category depth="2">{1}</category>
</target>
<property name="leftmenucataloga" value="1" />
<sort>ord</sort>
</selection>
tpls/data/usel/menu.tpl<?php
$FORMS = Array();
$FORMS['elements_block'] = <<<END
%items%
END;
$FORMS['elements_block_line'] = <<<END
<div class="%custom is_active_page(%id%)%"><h4><a href="%link%">%name%</a></h4>
%data doSelection(menu1, menu, %id%)%</div>
END;
$FORMS['elements_block_empty'] = <<<END
END;
?>
tpls/data/usel/menu1.tpl<?php
$FORMS = Array();
$FORMS['elements_block'] = <<<END
<ol class="%custom is_ol_active(%id%)%">%items%</ol>
END;
$FORMS['elements_block_line'] = <<<END
<li class="%custom is_li_active(%id%)%"><a href="%link%">%name%</a>
%data doSelection(menu1, menu, %id%)%</li>
END;
$FORMS['elements_block_empty'] = <<<END
END;
?>
tpls/content/inner.tpl%data doSelection(menu, menu, 0)%<br />
css/css.css.nav3-grid ol {
line-height: 30px;
height: 0px; /*Сворачивает меню*/
list-style-type: none;
overflow: hidden;
padding: 0px;
}
.nav3-grid:hover ol {
height: auto;
}
.nav3-grid-active ol {
line-height: 30px;
height: auto;
list-style-type: none;
overflow: hidden;
padding: 0px;
}
classes/modules/custom.php public function is_active_page($id=NULL) {
if(!$id) return;
$page_id = cmsController::getInstance()->getCurrentElementId();// берем id текущей страницы
if($page_id==$id) return 'nav3-grid-active';
else return 'nav3-grid';
}
public function is_li_active($id=NULL) {
if(!$id) return;
$page_id = cmsController::getInstance()->getCurrentElementId();
if($page_id==$id) return 'liactive';
else return 'linoactive';
}
/*public function is_ol_active($id=NULL) {
if(!$li=='liactive') return 'olactive';
else return 'olnoactive';
}*/