Answer the question
In order to leave comments, you need to log in
How to display a field for describing the value of the infoblock property?
Hello, available in news.list
<?if (!empty($arItem["PROPERTIES"]["FILE"]["VALUE"])):?>
<?foreach($arItem["PROPERTIES"]["FILE"]["VALUE"] as $PHOTOS):
$file = CFile::ResizeImageGet($PHOTOS, array('width'=>150, 'height'=>'112'), BX_RESIZE_IMAGE_EXACT, true);
?>
<div><a href="<?=CFile::GetPath($PHOTOS)?>">
<img src="<?=$file["src"]?>" alt="<?=$arItem["PROPERTIES"]["FILE"]["DESCRIPTION"][$PHOTOS];?>" /></a>
</div>
<?endforeach?>
<?endif?>
<?=$arItem["PROPERTIES"]["FILE"]["DESCRIPTION"][$PHOTOS];?>"
Answer the question
In order to leave comments, you need to log in
In the foreach add $key and substitute it as the key of the DESCRIPTION array.
first, remove the logic from the template in result_modifier.
secondly, organize the loop so that you can access the array in which both the description and the value are stored by key
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question