M
M
malayamarisha2021-09-24 14:04:30
1C-Bitrix
malayamarisha, 2021-09-24 14:04:30

How to get custom subsection properties?

Good day!
You need to get the custom property of the "UF_ICON" subkey.
I get the custom property in the section in the following way. The catalog component contains the sections.php file, which contains the section parameters:

$sectionListParams = array(
  "IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"],
  "IBLOCK_ID" => $arParams["IBLOCK_ID"],
  "CACHE_TYPE" => $arParams["CACHE_TYPE"],
  "CACHE_TIME" => $arParams["CACHE_TIME"],
  "CACHE_GROUPS" => $arParams["CACHE_GROUPS"],
  "COUNT_ELEMENTS" => $arParams["SECTION_COUNT_ELEMENTS"],
  "TOP_DEPTH" => $arParams["SECTION_TOP_DEPTH"],
  "SECTION_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["section"],
  "VIEW_MODE" => $arParams["SECTIONS_VIEW_MODE"],
  "SHOW_PARENT_NAME" => $arParams["SECTIONS_SHOW_PARENT_NAME"],
  "HIDE_SECTION_NAME" => (isset($arParams["SECTIONS_HIDE_SECTION_NAME"]) ? $arParams["SECTIONS_HIDE_SECTION_NAME"] : "N"),
  "ADD_SECTIONS_CHAIN" => (isset($arParams["ADD_SECTIONS_CHAIN"]) ? $arParams["ADD_SECTIONS_CHAIN"] : ''),
    "SECTION_USER_FIELDS" => array("UF_ICON"),
);

In this case, the line "SECTION_USER_FIELDS" => array("UF_ICON") is responsible for the user field. But this field is visible in the section, but not in subsections.
For example:
Section 1 (UF_ICON is visible)
Subsection 1-1 (UF_ICON is not visible) Can

you please tell me how to get the field in all sections/subsections?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question