M
M
Maxim Shadrin2016-09-29 09:58:37
1C-Bitrix
Maxim Shadrin, 2016-09-29 09:58:37

How to display a list of sub-items of one specific menu item in Bitrix?

For knowledgeable people, the question should seem ridiculous, but I can not do it.
I understand that it is necessary to use $APPLICATION->IncludeComponent("bitrix:menu", but with what parameters, I can’t catch up. I smoked the documentation, googled it, substituted it at random, but I thought it would be easier to ask directly than to poke blindly further.
Here is a specific example:
There is a page that opens on click - Products. The page displays all the sub-items of this menu, but now they are created by hand. I wish they were automatic.
pskfenster.ru/production
I also want to display some menus with their sub-items in the footer. By the way, is it possible to exclude certain sub-items in the output through the settings?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita, 2016-09-29
@makc9I

You need to use a multi-level menu template + enable the option of included files, ext files will be created that will contain menu items for sections. I forgot to mention that you also need to select the menu type for sub-items

M
Maxim Shadrin, 2016-09-29
@makc9I

The main menu is displayed like this

<?$APPLICATION->IncludeComponent("bitrix:menu", "horizontal_multilevel_fenster", Array(
  "ROOT_MENU_TYPE" => "top",	// Тип меню для первого уровня
  "MENU_CACHE_TYPE" => "N",	// Тип кеширования
  "MENU_CACHE_TIME" => "3600",	// Время кеширования (сек.)
  "MENU_CACHE_USE_GROUPS" => "Y",	// Учитывать права доступа
  "MENU_CACHE_GET_VARS" => "",	// Значимые переменные запроса
  "MAX_LEVEL" => "3",	// Уровень вложенности меню
  "CHILD_MENU_TYPE" => "sub",	// Тип меню для остальных уровней
  "USE_EXT" => "N",	// Подключать файлы с именами вида .тип_меню.menu_ext.php
  "DELAY" => "N",	// Откладывать выполнение шаблона меню
  "ALLOW_MULTI_SELECT" => "N",	// Разрешить несколько активных пунктов одновременно
  ),
  false
);?>

Yes, it seems like directory partitions are displayed. Is there any option that allows you to specify the id of the parent so that the output dances from it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question