Answer the question
In order to leave comments, you need to log in
How to display a picture for the announcement from the add. infoblock images in Bitrix?
There are goods in the catalog, but images were uploaded in bulk to the custom property "SYSTEM_IMAGES",
in the catalog.section list the output comes only from the Image from the Announcement, if it is not filled in, then there will be no photo.
The trick is that there is a solution and there the image output template is like this:
$sPictureSrc = ArrayHelper::getValue($arElement, ['PICTURE', 'src']);
<?= Html::img($sPictureSrc, $arPictureAttributes) ?>
<?= $arElement["DISPLAY_PROPERTIES"]["SYSTEM_IMAGES"]["FILE_VALUE"]["0"]["SRC"] ?>
Answer the question
In order to leave comments, you need to log in
if ($sPictureSrc && file_exists($_SERVER["DOCUMENT_ROOT"].$sPictureSrc))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question