Answer the question
In order to leave comments, you need to log in
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
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
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
);?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question