Answer the question
In order to leave comments, you need to log in
How to display the number of subsections of a section?
so I get the number of elements, but I need active sections
if(CModule::IncludeModule("iblock")){
// выборка только активных разделов из инфоблока $IBLOCK_ID, $ID - раздел-родителя
$arFilter = Array('IBLOCK_ID'=>28, 'GLOBAL_ACTIVE'=>'Y', 'SECTION_ID'=>$arSection['ID']);
$db_list = CIBlockSection::GetList(Array($by=>$order), $arFilter, true);
while($ar_result = $db_list->GetNext())
{
echo $ar_result['ID'].' '.$ar_result['NAME'].': '.$ar_result['ELEMENT_CNT'].'<br>';
}
}
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