S
S
seizon2015-10-09 19:00:59
PHP
seizon, 2015-10-09 19:00:59

How to display file descriptions in Bitrix?

Please tell me how to display the description of files in Bitrix? I made the output of the description of one file, but if there are two or more files, another piece of code is used, but I don’t know how to insert the output of the description into it.
Here is the code itself:

<?foreach($arResult["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
    <?if($arProperty["CODE"] != "MORE_PHOTO"):?>
<div class="news"><span><h3><?=$arProperty["NAME"]?>:</h3></span><?
      if(is_array($arProperty["DISPLAY_VALUE"]= str_replace("Загрузить", "Скачать",$arProperty["DISPLAY_VALUE"]))):
        echo implode("&nbsp;/&nbsp;", $arProperty["DISPLAY_VALUE"]= str_replace("Загрузить", "Скачать",$arProperty["DISPLAY_VALUE"]));
      elseif($pid=="MANUAL"):
        ?><a href="<?=$arProperty["VALUE"]?>"><?=GetMessage("CATALOG_DOWNLOAD")?></a><?
      else:
if($arProperty["DISPLAY_VALUE"] == "Y"){echo "Да";} else {echo $arProperty["DISPLAY_VALUE"]= str_replace("Загрузить", "Скачать",$arProperty["DISPLAY_VALUE"]);}?>&nbsp;<i><? print_r( $arResult["DISPLAY_PROPERTIES"]["FILE"]["FILE_VALUE"]["DESCRIPTION"]);?></i>

<?endif?>
        </div>
    <?endif;?>
  <?endforeach?>

043330d2947141ee8d16f66e12b52065.JPG82e90c89bcda40b484f25c4e9b1bada0.JPG

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Novikov, 2015-10-14
@dmitriy_novikov

output the $arProperty array in the right place and see what is in it and under what names.
<pre>
<?print_r($arProperty)?>
</pre>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question