Как сделать, чтоб выводились подкатегории только текущей (открытой категории), а не от всех сразу.
Компонент в шаблоне:
$APPLICATION->IncludeComponent(
"bitrix:catalog.section.list",
"sections_fotogallery",
array(
"VIEW_MODE" => "TEXT",
"SHOW_PARENT_NAME" => "Y",
"IBLOCK_TYPE" => "aspro_max_catalog",
"IBLOCK_ID" => $arParams["IBLOCK_ID"],
"SECTION_ID" => $arResult["PARENT_ID"],
"SECTION_CODE" => $arResult["VARIABLES"]["SECTION_CODE"],
"SECTION_URL" => "",
"COUNT_ELEMENTS" => "Y",
"TOP_DEPTH" => "2",
"SECTION_FIELDS" => array(
0 => "",
1 => "",
),
"SECTION_USER_FIELDS" => array(
0 => "",
1 => "",
),
"ADD_SECTIONS_CHAIN" => "N",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000",
"CACHE_NOTES" => "",
"CACHE_GROUPS" => "Y",
"COMPONENT_TEMPLATE" => "sections_fotogallery",
"COUNT_ELEMENTS_FILTER" => "CNT_ACTIVE",
"FILTER_NAME" => "sectionsFilter",
"CACHE_FILTER" => "N"
),
false
);
И вывод:
<?foreach( $arResult["SECTIONS"] as $arItems ){
if($arItems["DEPTH_LEVEL"] == 2):
?>
<div class="photogallery-section">
<a id="sectionlink<?=$arItems["ID"]?>" href="/photos/<?=$arItems["ID"]?>/" class="section-compact-list__link dark_link option-font-bold"><span><?=$arItems["NAME"]?></span></a>
</div>
<?
endif;
}?>