V
V
viktorulyushev2016-11-30 10:24:47
1C-Bitrix
viktorulyushev, 2016-11-30 10:24:47

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"]?>:&nbsp;
      <?if(is_array($arProperty["DISPLAY_VALUE"])):?>
        <?=implode("&nbsp;/&nbsp;", $arProperty["DISPLAY_VALUE"]);?>
      <?else:?>
        <?=$arProperty["DISPLAY_VALUE"];?>
      <?endif?>
      </small><br />
    <?endforeach;?>

displays only links to images, how can I make it display my images?
6aad5e0cea9a488fb3c3cadaf5ffd06a.PNG

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ildar Gizetdinov, 2016-11-30
@viktorulyushev

<?foreach($arItem["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
  <small>
    <?=$arProperty["NAME"]?>:&nbsp;
    <?if($arProperty["CODE"] == "SLIDE_IMAGE") {?>
      <?foreach($arProperty["VALUE"] as $image) {?>
        <img src="<?=CFile::GetPath($image)?>" />
      <?}?>
    <?} else {?>
      <?if(is_array($arProperty["DISPLAY_VALUE"])):?>
        <?=implode("&nbsp;/&nbsp;", $arProperty["DISPLAY_VALUE"]);?>
      <?else:?>
        <?=$arProperty["DISPLAY_VALUE"];?>
      <?endif?>
    <?}?>
  </small><br />
<?endforeach;?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question