Answer the question
In order to leave comments, you need to log in
How to make a menu of one category in Bitrix?
Infoblock standard catalog
Task - here is a section /catalog/apple
. In this section, I add an include area, insert a new menu there, and I want it to generate a list of child categories /catalog/apple/iphone, /catalog/apple/ipad, / catalog/apple/mac (etc)
It is clear that you can manually add changing elements to this, but it is necessary that it be automatically displayed.
I tried following the example of connecting menu.ext type -
<?
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" => "/catalog/",
"SECTION_PAGE_URL" => "#SECTION_CODE#/",
"DETAIL_PAGE_URL" => "#SECTION_CODE#/#ELEMENT_CODE#",
"IBLOCK_TYPE" => "1c_catalog",
"IBLOCK_ID" => "15",
"DEPTH_LEVEL" => "3",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "3600"
),
false
);
$aMenuLinks = array_merge($aMenuLinks, $aMenuLinksExt);
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question