StartResultCache(60*60*24, md5(var_export($_POST, true)))) { if(CModule::IncludeModule('iblock')) { $arResult = []; $sort = Array("ACTIVE_FROM" => "DESC", "NAME" => "ASC"); $filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => 6); $options = Array("nPageSize" => 10); $res = CIBlockElement::GetList($sort, $filter, false, $options); $arResult = ['ITEMS' => []]; while ($obElement = $res->GetNextElement()) { $ar_res = $obElement->GetFields(); $ar_res['PROPERTIES'] = $obElement->GetProperties(); if(isset($ar_res['PREVIEW_PICTURE'])) { $ar_res['PREVIEW_PICTURE'] = CFile::GetPath($ar_res['PREVIEW_PICTURE']); } $arResult['ITEMS'][] = $ar_res; } $this->IncludeComponentTemplate(); } }