<?foreach($arResult['SEARCH'] as $arItem):?>
<div class="news-item">
<a href="#" class="service__link"><?echo $arItem["TITLE_FORMATED"]?></a>
<p class="service__field"><?echo $arItem["ELEMENT"]['PROPERTY_EMPTY_VALUE']?></p>
<p class="service__field"><?echo $arItem["ELEMENT"]['PROPERTY_NDS_VALUE']?></p>
<p class="service__field"><?echo $arItem["ELEMENT"]['PROPERTY_FILIAL_VALUE']?></p>
</div>
<?endforeach;?>
<?php if (count($arResult["SEARCH"]) > 0) {
$arIDs = array();
foreach ($arResult["SEARCH"] as $si => $arItem) {
if ($arItem["MODULE_ID"] == "iblock" && substr($arItem["ITEM_ID"], 0, 1) !== "S") {
$arIDs[ $arItem['PARAM2'] ][ $arItem["ITEM_ID"] ] = $si;
}
}
CModule::IncludeModule('iblock');
foreach ($arIDs as $iblockId => $searchIds) {
$grab = CIBlockElement::GetList(array(), array(
"IBLOCK_ID" => $iblockId,
"ID" => array_keys($searchIds)
), false, false, array(
"ID",
"IBLOCK_ID",
"PREVIEW_PICTURE",
"PROPERTY_FILIAL",
"PROPERTY_NDS",
"PROPERTY_EMPTY",
));
while ($ar = $grab->Fetch()) {
$ar['PICTURE'] = CFile::GetFileArray($ar["PREVIEW_PICTURE"]);
$si = $arIDs[ $iblockId ][ $ar["ID"] ];
$arResult["SEARCH"][ $si ]["ELEMENT"] = $ar;
}
}
}
?>
<?
$arSelect = Array("ID"=>$arItem["ITEM_ID"], "IBLOCK_ID"=>$arItem['PARAM2'], "NAME"=>$arItem["TITLE"], "DATE_ACTIVE_FROM","PROPERTY_*");//IBLOCK_ID и ID обязательно должны быть указаны, см. описание arSelectFields выше
$arFilter = Array("IBLOCK_ID"=>$arItem['PARAM2'], "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y");
$res = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>50), $arSelect);
while($ob = $res->GetNextElement()){
$arFields = $ob->GetFields();
$arProps = $ob->GetProperties();
}
?>
$arSelect = Array("ID"=>$arResult["ITEM_ID"], "IBLOCK_ID", "NAME", "DATE_ACTIVE_FROM","PROPERTY_*");
<p class="service__field"><?php print_r ($arProps['EMPTY']['VALUE'])?></p>
<p class="service__field"><?php print_r ($arProps['NDS']['VALUE'])?></p>
<p class="service__field"><?php print_r ($arProps['FILIAL']['VALUE'])?></p>
<?
$arSelect = Array("ID", "IBLOCK_ID", "NAME", "DATE_ACTIVE_FROM","PROPERTY_*");//IBLOCK_ID и ID обязательно должны быть указаны, см. описание arSelectFields выше
$arFilter = Array("IBLOCK_ID"=>IntVal(15), "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y");
$res = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>50), $arSelect);
while($ob = $res->GetNextElement()){
$arFields = $ob->GetFields();
$arProps = $ob->GetProperties();
}
?>
<?php $year = intval($_GET["CATEGORY"]);
if ($year !== 10000000000000000)
{
$arrFilter=array("PROPERTY"=>array("CATEGORY"=>"$year"));
}
?>
<a class="service__link" href="section.php?SECTION_ID=15&CATEGORY=vet">
<a class="service__link" href="section.php?SECTION_ID=15&CATEGORY=2">
То есть филиал: значение