There is such a menu

<?$APPLICATION->IncludeComponent( "bitrix:menu", "tree", Array( "ROOT_MENU_TYPE" => "top", "MENU_CACHE_TYPE" => "N", "MENU_CACHE_TIME" => "3600", "MENU_CACHE_USE_GROUPS" => "Y", "MENU_CACHE_GET_VARS" => array(""), "MAX_LEVEL" => "2", "CHILD_MENU_TYPE" => "dopmenu", "USE_EXT" => "Y", "DELAY" => "N", "ALLOW_MULTI_SELECT" => "N", "COMPONENT_TEMPLATE" => "tree" ) );?> 

The fact is that it generates html of this type, that is, without specifying which menu item is active and another slag throws in, where it can be fixed or which human template is in this cms

  <div class="menu-sitemap-tree"> <ul> <li> <div class="page"></div> <div class="item-text"><a href="/parent1/">Родитель1</a></div> </li> <li> <div class="folder" onclick="OpenMenuNode(this)"></div> <div class="item-text"><a href="/parent2/">Родитель2</a></div> <ul> <li> <div class="page"></div> <div class="item-text"><a href="/parent2/son1/">Сынок1</a></div> </li> <li> <div class="page"></div> <div class="item-text"><a href="/parent2/son1/">Сынок2</a></div> </li> </ul> </li> <li> <div class="page"></div> <div class="item-text"><a href="/novosti/">Новости</a></div> </li> <li> <div class="page"></div> <div class="item-text"><a href="/aktsii/">Акции</a></div> </li> <li> <div class="page"></div> <div class="item-text"><a href="/voprosy-i-otvety/">Вопросы и ответы</a></div> </li> <li> <div class="page"></div> <div class="item-text"><a href="/kontakty/">Контакты</a></div> </li> </ul> </div> 
  • one
    Here you have a template - tree - u_mulder
  • @u_mulder and where his file lies or how to create your own - Serge Esmanovich
  • one
    Ymoyo, these are basic concepts and googled at a time. dev.1c-bitrix.ru/learning/course/… - ka3a

1 answer 1

Your template is (by default) in the bitrix->components->bitrix->bitrix:menu->temlates->tree . The template file itself is called template.php .

  • I figured out it was necessary to make the same structure in the template as in the components, then copy the template there and rewrite the menu output - Serge Esmanovich