Answer the question
In order to leave comments, you need to log in
How to display a custom property for a Bitrix section?
It is necessary to display a custom property in the Bitrix section. There is an approximate code that can possibly be completed and everything will work as it should.
<?
$rsResult = CIBlockSection::GetList(array("SORT"=>"ASC"), array("IBLOCK_ID"=>"1"), false, array("UF_HEADH1"));
while($arResult = $rsResult->GetNext())
{
echo $arResult[UF_HEADH1]; }
?>
Answer the question
In order to leave comments, you need to log in
Well, you filter by IBLOCK_ID, what prevents you from filtering by the section code or by its ID?
$select = [
"UF_HEADH1"
];
$sort = [
"SORT" => "ASC"
];
$filter = [
/* @var int ID инфоблока */
'IBLOCK_ID' => 1,
/* @var string Символьный код раздела */
'CODE' => 'SECTION_CODE',
/* @var int ID раздела */
'ID' => 123,
];
$rsResult = CIBlockSection::GetList(
$sort,
$filter,
false,
$select
);
while($arResult = $rsResult->GetNext())
{
echo $arResult['UF_HEADH1'];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question