S
S
SouLFiX2017-06-25 11:41:17
CMS
SouLFiX, 2017-06-25 11:41:17

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

3 answer(s)
D
den-masonov, 2017-06-25
@SouLFiX

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",

We need different

S
Sanes, 2017-06-25
@Sanes

Look for videos on Youtube. I saw exactly.

S
Shad30, 2017-06-25
@Shad30

https://www.youtube.com/watch?v=_p_6FhOoKXE

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question