Answer the question
In order to leave comments, you need to log in
Why does the custom file type field in Bitrix not want to add a pdf file?
You need to upload a PDF in the custom field of the section.
Added a custom field of type File.
Inserted in result_modifer
$db_list = CIBlockSection::GetList(Array($by=>$order), $arFilter = Array("IBLOCK_ID"=>$arParams["IBLOCK_ID"], "ID"=>$arResult['SECTIONS']), true,$arSelect=Array("UF_FILES"));
while($ar_result = $db_list->GetNext()) {
$arResult["UF_FILES"][$ar_result["ID"]] = CFile::GetPath($ar_result["UF_FILES"]);
}
<?if($arResult['UF_FILES'][$arResult['ID']]):{?>
<a target="_blank" href="<? echo $arResult['UF_FILES'][$arResult['ID']];?>">Посмотреть</a>
<
<?}endif;?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question