Пишем стандартный компонент. Обычно ID Раздела можно получить так через параметр $arCurrentValues[‘IBLOCK_ID’]
Код ниже.
if (0 < intval($arCurrentValues['IBLOCK_ID'])) { $arPropList = array(); $arFilter = ['IBLOCK_ID' => $arCurrentValues['IBLOCK_ID']]; $arOrder = ['LEFT_MARGIN' => 'ASC']; $arSelect = ['ID','LEFT_MARGIN','DEPTH_LEVEL','NAME']; $resSections = \CIBlockSection::GetList($arOrder, $arFilter, false, $arSelect); while( $arSection = $resSections->fetch() ) { $add=''; if ($arSection['DEPTH_LEVEL']>1) { for($i=1;$i<=$arSection['DEPTH_LEVEL'];$i++) { $add=$add.'-'; } } $arPropList[$arSection['ID']] = $add.$arSection['NAME']; } $arComponentParameters['PARAMETERS']['CITY_NORMAL_SHOW'] = array( 'NAME' => 'Список городов для отображения', 'TYPE' => 'LIST', 'VALUES' => $arPropList, ); } $arComponentParameters = array( "PARAMETERS" => array( "IBLOCK_TYPE" => array( "PARENT" => "BASE", "NAME" => "Тип инфоблока", "TYPE" => "LIST", "VALUES" => $arTypesEx, "DEFAULT" => "news", "REFRESH" => "Y", ), "IBLOCK_ID" => array( "PARENT" => "BASE", "NAME" => "Инфобок", "TYPE" => "LIST", "VALUES" => $arIBlocks, "DEFAULT" => '={$_REQUEST["ID"]}', "ADDITIONAL_VALUES" => "Y", "REFRESH" => "Y", ), "CITY_NORMAL_SHOW" => array( "PARENT" => "BASE", "NAME" => "Список городов для отображения", "TYPE" => "LIST", "VALUES" => $arPropList, "MULTIPLE" => "Y", "REFRESH" => "Y", ), 'CACHE_TIME' => Array('DEFAULT'=>3600), ), );