W
W
WebforSelf2019-05-17 01:33:25
1C-Bitrix
WebforSelf, 2019-05-17 01:33:25

How to display additional "image" field in bitrix sections?

Goodnight. Tell me please.
Created an additional file field and uploaded a picture there.
I want to display it on the section page.

<?
$ar_result=CIBlockSection::GetList(Array("SORT"=>"ASC"), Array("IBLOCK_ID"=>"3", "ID"=>"3"),false, Array("UF_IMG")); 
if($res=$ar_result->GetNext())echo $res["UF_IMG"];
?>

I'm trying to display this way, it doesn't output anything.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Gritsuk, 2019-05-17
@winer

https://dev.1c-bitrix.ru/api_help/iblock/classes/c...
Also in $res["UF_IMG"] there will most likely be a file ID. To get an array that describes it, you can use the CFile::GetFileArray method

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question