K
K
kimqar342534262021-05-27 14:36:06
1C-Bitrix
kimqar34253426, 2021-05-27 14:36:06

Bitrix how to display custom property in template.php catalog.section.list?

There is an infoblock with sections, inside the sections there are elements.
How to display the UF_ICO_TV custom property for sections in the catalog.section.list template?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BornTo FreeFall, 2021-05-27
@BornToFreeFall

$selectArray = [
  "UF_ICO_TV"
];

$sortArray = [
  "SORT" => "ASC"
];

$filterArray = [
  'IBLOCK_ID' => 1,

  /* @var string Символьный код раздела */
  'CODE' => 'SECTION_CODE',

  /* @var int ID раздела */
  'ID' => 123,
];

$rsResult = CIBlockSection::GetList(
  $sortArray,
  $filterArray,
  false,
  $selectArray,
);
while($arResult = $rsResult->GetNext())
{
  echo $arResult['UF_ICO_TV'];
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question