Answer the question
In order to leave comments, you need to log in
How to connect sub menu with static menu!?
Good afternoon!
How to connect a dynamic submenu to a static menu in Bitrix!?
We have code:
<?
$aMenuLinks = Array(
Array(
"Каталог",
"catalog/",
Array(),
Array(),
""
),
Array(
"О компании",
"about/",
Array(),
Array(),
""
),
Array(
"Доставка",
"faq/delivery/",
Array(),
Array(),
""
)
);
?>
Array(
"Каталог",
"catalog/",
Array(),
Array(),
""
),
- каталог
-- каталог/раздел (динамика - инфоблок)
-- каталог/раздел (динамика - инфоблок)
- о компании
- доставка
Answer the question
In order to leave comments, you need to log in
In the menu settings, set the nesting level to 2, the menu type for the remaining levels is "Left Menu"
In the folder to which the first link leads Directory, put the file left.menu_ext.php
Add the following code to the file
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
global $APPLICATION;
$aMenuLinksExt=$APPLICATION->IncludeComponent("bitrix:menu.sections", "", array(
"IS_SEF" => "Y",
"SEF_BASE_URL" => "",
"SECTION_PAGE_URL" => "#SECTION_ID#/",
"DETAIL_PAGE_URL" => "#SECTION_ID#/#ELEMENT_ID#",
"IBLOCK_TYPE" => "products",
"IBLOCK_ID" => "2",
"DEPTH_LEVEL" => "1",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000"
),
false
);
$aMenuLinks = array_merge($aMenuLinks, $aMenuLinksExt);
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question