Answer the question
In order to leave comments, you need to log in
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(" / ", $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"]);}?> <i><? print_r( $arResult["DISPLAY_PROPERTIES"]["FILE"]["FILE_VALUE"]["DESCRIPTION"]);?></i>
<?endif?>
</div>
<?endif;?>
<?endforeach?>
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question