news.detail
в template.php
пытаюсь вывести картинку связанного свойства articlesAuthor
<?foreach ($arResult["PROPERTIES"]["articlesAuthor"] as $articlesID):?>
<?
$res = CIBlockElement::GetByID($articlesID);
if($ar_res = $res->GetNext()) ?>
<img src="<?=CFile::GetPath($ar_res["PREVIEW_PICTURE"]);?>" title=""/>
<?endforeach;?>
Картинка появляется НО два раза, хотя id 2682 один же...
указываю в цикле ["VALUE"]
<?foreach ($arResult["PROPERTIES"]["articlesAuthor"]["VALUE"]> as $articlesID):?>
вообще ничего не выводит.
подскажите в чем ошибка?
нужно ли использовать result_modifier.php ?
вывод $arResult["PROPERTIES"]
Array
(
[articlesAuthor] => Array
(
[ID] => 103
[TIMESTAMP_X] => 2023-04-12 09:34:43
[IBLOCK_ID] => 9
[NAME] => Автор
[ACTIVE] => Y
[SORT] => 500
[CODE] => articlesAuthor
[DEFAULT_VALUE] =>
[PROPERTY_TYPE] => E
[ROW_COUNT] => 1
[COL_COUNT] => 30
[LIST_TYPE] => L
[MULTIPLE] => N
[XML_ID] =>
[FILE_TYPE] =>
[MULTIPLE_CNT] => 5
[TMP_ID] =>
[LINK_IBLOCK_ID] => 21
[WITH_DESCRIPTION] => N
[SEARCHABLE] => N
[FILTRABLE] => N
[IS_REQUIRED] => N
[VERSION] => 1
[USER_TYPE] => EAutocomplete
[USER_TYPE_SETTINGS] => Array
(
[VIEW] => A
[SHOW_ADD] => Y
[MAX_WIDTH] => 0
[MIN_HEIGHT] => 24
[MAX_HEIGHT] => 1000
[BAN_SYM] => ,;
[REP_SYM] =>
[OTHER_REP_SYM] =>
[IBLOCK_MESS] => N
)
[HINT] =>
[PROPERTY_VALUE_ID] => 111439
[VALUE] => 2682
[DESCRIPTION] =>
[VALUE_ENUM] =>
[VALUE_XML_ID] =>
[VALUE_SORT] =>
[~VALUE] => 2682
[~DESCRIPTION] =>
[~NAME] => Автор
[~DEFAULT_VALUE] =>
)
)