Получение родителей секции.
if(CModule::IncludeModule("iblock")) { $rsParentSection = CIBlockSection::GetByID('7'); if ($arParentSection = $rsParentSection->GetNext()) { // var_dump($arParentSection); /* itdbg($arParentSection['ID']); */ itdbg($arParentSection['IBLOCK_ID']); itdbg($arParentSection['LEFT_MARGIN']); itdbg($arParentSection['RIGHT_MARGIN']); itdbg($arParentSection['DEPTH_LEVEL']); $arFilter = array( 'IBLOCK_ID' => $arParentSection['IBLOCK_ID'], '<=LEFT_BORDER' => $arParentSection['LEFT_MARGIN'], '>=RIGHT_BORDER' => $arParentSection['RIGHT_MARGIN'], // '<DEPTH_LEVEL' => $arParentSection['DEPTH_LEVEL'] ); // выберет потомков без учета активности $rsSect = CIBlockSection::GetList(array('DEPTH_LEVEL'=>'asc'),$arFilter); while ($arSect = $rsSect->GetNext()) { // получаем подразделы itdbg($arSect[NAME], false,3); itdbg($arSect[ID], false,3); itdbg($arSect[DEPTH_LEVEL], false,3); } } }