Есть у меня свойство бренд, оно привязано к другому иб, в детальной странице вывод реализован так
/*brand item*/
$arBrand = array();
if(strlen($arResult["DISPLAY_PROPERTIES"]["BRAND"]["VALUE"]) && $arResult["PROPERTIES"]["BRAND"]["LINK_IBLOCK_ID"]){
$arBrand = CNextCache::CIBLockElement_GetList(array('CACHE' => array("MULTI" =>"N", "TAG" => CNextCache::GetIBlockCacheTag($arResult["PROPERTIES"]["BRAND"]["LINK_IBLOCK_ID"]))), array("IBLOCK_ID" => $arResult["PROPERTIES"]["BRAND"]["LINK_IBLOCK_ID"], "ACTIVE"=>"Y", "ID" => $arResult["DISPLAY_PROPERTIES"]["BRAND"]["VALUE"]));
if($arBrand){
if($arParams["SHOW_BRAND_PICTURE"] == "Y" && ($arBrand["PREVIEW_PICTURE"] || $arBrand["DETAIL_PICTURE"])){
$picture = ($arBrand["PREVIEW_PICTURE"] ? $arBrand["PREVIEW_PICTURE"] : $arBrand["DETAIL_PICTURE"]);
$arBrand["IMAGE"] = CFile::ResizeImageGet($picture, array("width" => 120, "height" => 40), BX_RESIZE_IMAGE_PROPORTIONAL_ALT, true);
$arBrand["IMAGE"]["ALT"] = $arBrand["IMAGE"]["TITLE"] = $arBrand["NAME"];
if($arBrand["DETAIL_PICTURE"])
{
$arBrand["IMAGE"]["INFO"] = CFile::GetFileArray($arBrand["DETAIL_PICTURE"]);
$ipropValues = new \Bitrix\Iblock\InheritedProperty\ElementValues($arBrand["IBLOCK_ID"], $arBrand["ID"]);
$arBrand["IMAGE"]["IPROPERTY_VALUES"] = $ipropValues->getValues();
if($arBrand["IMAGE"]["IPROPERTY_VALUES"]["ELEMENT_DETAIL_PICTURE_FILE_TITLE"])
$arBrand["IMAGE"]["TITLE"] = $arBrand["IMAGE"]["IPROPERTY_VALUES"]["ELEMENT_DETAIL_PICTURE_FILE_TITLE"];
if($arBrand["IMAGE"]["IPROPERTY_VALUES"]["ELEMENT_DETAIL_PICTURE_FILE_ALT"])
$arBrand["IMAGE"]["ALT"] = $arBrand["IMAGE"]["IPROPERTY_VALUES"]["ELEMENT_DETAIL_PICTURE_FILE_ALT"];
if($arBrand["IMAGE"]["INFO"]["DESCRIPTION"])
$arBrand["IMAGE"]["ALT"] = $arBrand["IMAGE"]["TITLE"] = $arBrand["IMAGE"]["INFO"]["DESCRIPTION"];
}
}
}
}
$arResult["BRAND_ITEM"]=$arBrand;
и вывожу
<?if($arResult["BRAND_ITEM"]){?>
<div class="item_block col-<?=$col;?>">
<div class="brand">
<met a itemprop="brand" content="<?=$arResult["BRAND_ITEM"]["NAME"]?>" />
<?if(!$arResult["BRAND_ITEM"]["IMAGE"]):?>
<b class="block_title"><?=GetMessage("BRAND");?>:</b>
<a href="<?=$arResult["BRAND_ITEM"]["DETAIL_PAGE_URL"]?>"><?=$arResult["BRAND_ITEM"]["NAME"]?></a>
<?else:?>
<a class="brand_picture" href="<?=$arResult["BRAND_ITEM"]["DETAIL_PAGE_URL"]?>">
<img src="<?=$arResult["BRAND_ITEM"]["IMAGE"]["src"]?>" alt="<?=$arResult["BRAND_ITEM"]["IMAGE"]["ALT"]?>" title="<?=$arResult["BRAND_ITEM"]["IMAGE"]["TITLE"]?>" />
</a>
<?endif;?>
</div>
</div>
<?}?>
Но в catalo.sections так работать не хочет, менял всё на arItem всеравно неработает, помогите пожалуйста
UPD1
Пытался вывести так, без result_modifier.php сразу в шаблон, а то даже имя не выводило
<div class="brand">
<? /*brand item*/
$arBrand = array();
if(strlen($arItem["DISPLAY_PROPERTIES"]["BRAND"]["VALUE"]) && $arItem["PROPERTIES"]["BRAND"]["LINK_IBLOCK_ID"]){
$arBrand = CNextCache::CIBLockElement_GetList(array('CACHE' => array("MULTI" =>"N", "TAG" => CNextCache::GetIBlockCacheTag($arItem["PROPERTIES"]["BRAND"]["LINK_IBLOCK_ID"]))), array("IBLOCK_ID" => $arItem["PROPERTIES"]["BRAND"]["LINK_IBLOCK_ID"], "ACTIVE"=>"Y", "ID" => $arItem["DISPLAY_PROPERTIES"]["BRAND"]["VALUE"]));
if($arBrand){
if($arParams["SHOW_BRAND_PICTURE"] == "Y" && ($arBrand["PREVIEW_PICTURE"] || $arBrand["DETAIL_PICTURE"])){
$picture = ($arBrand["PREVIEW_PICTURE"] ? $arBrand["PREVIEW_PICTURE"] : $arBrand["DETAIL_PICTURE"]);
$arBrand["IMAGE"] = CFile::ResizeImageGet($picture, array("width" => 120, "height" => 40), BX_RESIZE_IMAGE_PROPORTIONAL_ALT, true);
$arBrand["IMAGE"]["ALT"] = $arBrand["IMAGE"]["TITLE"] = $arBrand["NAME"];
if($arBrand["DETAIL_PICTURE"])
{
$arBrand["IMAGE"]["INFO"] = CFile::GetFileArray($arBrand["DETAIL_PICTURE"]);
$ipropValues = new \Bitrix\Iblock\InheritedProperty\ElementValues($arBrand["IBLOCK_ID"], $arBrand["ID"]);
$arBrand["IMAGE"]["IPROPERTY_VALUES"] = $ipropValues->getValues();
if($arBrand["IMAGE"]["IPROPERTY_VALUES"]["ELEMENT_DETAIL_PICTURE_FILE_TITLE"])
$arBrand["IMAGE"]["TITLE"] = $arBrand["IMAGE"]["IPROPERTY_VALUES"]["ELEMENT_DETAIL_PICTURE_FILE_TITLE"];
if($arBrand["IMAGE"]["IPROPERTY_VALUES"]["ELEMENT_DETAIL_PICTURE_FILE_ALT"])
$arBrand["IMAGE"]["ALT"] = $arBrand["IMAGE"]["IPROPERTY_VALUES"]["ELEMENT_DETAIL_PICTURE_FILE_ALT"];
if($arBrand["IMAGE"]["INFO"]["DESCRIPTION"])
$arBrand["IMAGE"]["ALT"] = $arBrand["IMAGE"]["TITLE"] = $arBrand["IMAGE"]["INFO"]["DESCRIPTION"];
}
}
}
}
$arItem["BRAND_ITEM"]=$arBrand; ?>
<meta itemprop="brand" content="<?=$arItem["BRAND_ITEM"]["NAME"]?>" />
<?if(!$arItem["BRAND_ITEM"]["IMAGE"]):?>
<b class="block_title"><?=GetMessage("BRAND");?>:</b>
<a class="brand_picture" href="<?=$arItem["BRAND_ITEM"]["DETAIL_PAGE_URL"]?>">
<img src="<?=$arItem["BRAND_ITEM"]["IMAGE"]["src"]?>" alt="<?=$arItem["BRAND_ITEM"]["IMAGE"]["ALT"]?>" title="<?=$arItem["BRAND_ITEM"]["IMAGE"]["TITLE"]?>" />
</a>
<?else:?>
<a class="brand_picture" href="<?=$arItem["BRAND_ITEM"]["DETAIL_PAGE_URL"]?>">
<img src="<?=$arItem["BRAND_ITEM"]["IMAGE"]["src"]?>" alt="<?=$arItem["BRAND_ITEM"]["IMAGE"]["ALT"]?>" title="<?=$arItem["BRAND_ITEM"]["IMAGE"]["TITLE"]?>" />
</a>
<?endif;?>
</div>
но картинка не выводится