Answer the question
In order to leave comments, you need to log in
How to create a multi-level menu in bitrix?
I have created directories and inside subdirectories. I put them in the menu, in the header. Everything works great on the main page, the menu and sub-items drop out. But if I go to the pages of the second level, inside, then all the menu items disappear there and only one item remains, which I switched to.
Maybe I'm missing something? It's ridiculous that I struggle with such an elementary task all day long. Googled, people had similar questions, but not one intelligible answer.
Menu call code:
<?$APPLICATION->IncludeComponent(
"bitrix:menu",
"submenu",
array(
"ROOT_MENU_TYPE" => "submenu",
"MAX_LEVEL" => "2",
"CHILD_MENU_TYPE" => "submenu",
"USE_EXT" => "N",
"ALLOW_MULTI_SELECT" => "N",
"MENU_CACHE_TYPE" => "N",
"MENU_CACHE_TIME" => "3600",
"MENU_CACHE_USE_GROUPS" => "Y",
"MENU_CACHE_GET_VARS" => array(
),
"COMPONENT_TEMPLATE" => "submenu"
),
false
);?>
Answer the question
In order to leave comments, you need to log in
As far as I understand, you have a menu file inside the subsection that duplicates the one at the root. Delete it in the subdirectory if there is one.
UPD: and why do you have one type of menu in the root level and in sublevels?
"ROOT_MENU_TYPE" => "submenu",
"MAX_LEVEL" => "2",
"CHILD_MENU_TYPE" => "submenu",
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question