Answer the question
In order to leave comments, you need to log in
Bitrix. How to get a picture for a non-link?
There is a custom property file for the infoblock, I need to display a couple of pictures. This code:
<?foreach($arItem["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<small>
<?=$arProperty["NAME"]?>:
<?if(is_array($arProperty["DISPLAY_VALUE"])):?>
<?=implode(" / ", $arProperty["DISPLAY_VALUE"]);?>
<?else:?>
<?=$arProperty["DISPLAY_VALUE"];?>
<?endif?>
</small><br />
<?endforeach;?>
Answer the question
In order to leave comments, you need to log in
<?foreach($arItem["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<small>
<?=$arProperty["NAME"]?>:
<?if($arProperty["CODE"] == "SLIDE_IMAGE") {?>
<?foreach($arProperty["VALUE"] as $image) {?>
<img src="<?=CFile::GetPath($image)?>" />
<?}?>
<?} else {?>
<?if(is_array($arProperty["DISPLAY_VALUE"])):?>
<?=implode(" / ", $arProperty["DISPLAY_VALUE"]);?>
<?else:?>
<?=$arProperty["DISPLAY_VALUE"];?>
<?endif?>
<?}?>
</small><br />
<?endforeach;?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question