<? if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) die();

if (!empty($arResult["DETAIL_PICTURE"]["SRC"])) {
  $arResult["PICTURE"] = $arResult["DETAIL_PICTURE"]["SRC"];
}

if (!empty($arResult["DISPLAY_PROPERTIES"]["DATE"]["VALUE"])) {
  $arResult["DATE"] = CIBlockFormatProperties::DateFormat($arParams["ACTIVE_DATE_FORMAT"], MakeTimeStamp($arResult["DISPLAY_PROPERTIES"]["DATE"]["VALUE"], CSite::GetDateFormat()));
}


//другие новости
$arResult['OTHERS']=[];
$arFilter = Array(
    "IBLOCK_ID"=>$arParams['IBLOCK_ID'],
    "ACTIVE"=>"Y",
    "!ID"=>$arResult['ID']

);
$res = CIBlockElement::GetList(Array("ID"=>"DESC"), $arFilter, false, array('nTopCount'=>3), $arSelect);
while($ob = $res->GetNextElement()) {
    $arItem = $ob->GetFields();
    $arItem['PREVIEW_PICTURE']= CFile::GetFileArray($arItem['PREVIEW_PICTURE']);
    $arItem['PROPERTIES'] = $ob->GetProperties();
    $arResult['OTHERS'][]=$arItem;




}

