CIBlockResult
CIBlockSection::GetList(
array arOrder = Array("SORT"=>"ASC"),
array arFilter = Array(),
bool bIncCnt = false,
array Select = Array(),
array NavStartParams = false
);
<ul>
<?
\Bitrix\Main\Loader::IncludeModule('iblock');
$arFilter = [
'IBLOCK_ID' => 5
];
$arOrder = [
'LEFT_MARGIN' => 'ASC'
];
$arSelect = [
'ID',
'LEFT_MARGIN',
'DEPTH_LEVEL',
'NAME'
];
$resSections = \CIBlockSection::GetList($arOrder, $arFilter, false, $arSelect);
while( $arSection = $resSections->fetch() )
{?><li><?=$arSection[NAME]?></li><?}
?>
</ul>