Столкнулся с проблемкой и никак не могу решить.
Добавил свойство Фотографии с внешним кодом MORE_PHOTO
Загрузил пару фоток,
Вставил в шаблон код:
Код |
---|
<? foreach ($arResult["PROPERTIES"]["MORE_PHOTO"] as $arImgID): $arImage = CFile::GetFileArray($arImageID);?> <img src="<?=$arImage[$arImgID]?>" /> <? endforeach; ?> |
Если вывести внутри цикла <? print_r($arImage)?><BR>
То вот что показывает:
Код |
---|
Array ( [ID] => 386 [TIMESTAMP_X] => 2020-03-14 10:15:10 [IBLOCK_ID] => 16 [NAME] => Фотографии [ACTIVE] => Y [SORT] => 500 [CODE] => MORE_PHOTO [DEFAULT_VALUE] => [PROPERTY_TYPE] => F [ROW_COUNT] => 1 [COL_COUNT] => 30 [LIST_TYPE] => L [MULTIPLE] => Y [XML_ID] => foto [FILE_TYPE] => jpg, gif, bmp, png, jpeg [MULTIPLE_CNT] => 5 [TMP_ID] => [LINK_IBLOCK_ID] => 0 [WITH_DESCRIPTION] => Y [SEARCHABLE] => Y [FILTRABLE] => N [IS_REQUIRED] => Y [VERSION] => 1 [USER_TYPE] => [USER_TYPE_SETTINGS] => [HINT] => [PROPERTY_VALUE_ID] => Array ( [0] => 508757 [1] => 509010 ) [VALUE] => Array ( [0] => 2496 [1] => 2569 ) [DESCRIPTION] => Array ( [0] => 111111 [1] => 222222 ) [VALUE_ENUM] => [VALUE_XML_ID] => [VALUE_SORT] => [~VALUE] => Array ( [0] => 2496 [1] => 2569 ) [~DESCRIPTION] => Array ( [0] => 111111 [1] => 222222 ) [~NAME] => Фотографии [~DEFAULT_VALUE] => ) |