StartResultCache(60*60*24, md5(var_export($_POST, true)))) { if(CModule::IncludeModule('iblock')) { $arResult = [ 'MATERIALS' => [], ]; $sort = Array("SORT" => "ASC", "NAME" => "ASC"); $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => 20); $options = false; $res = CIBlockElement::GetList($sort, $filter, false, $options); while ($obElement = $res->GetNextElement()) { $ar_res = $obElement->GetFields(); $arResult['MATERIALS'][] = $ar_res; } $this->IncludeComponentTemplate(); } }