J
J
jorshjorsh952018-07-23 14:19:17
1C-Bitrix
jorshjorsh95, 2018-07-23 14:19:17

How to add infoblock section property and filter by it?

Hello.
There is an infoblock, it has 10 sections with a bunch of child elements.
You need to display only 4 sections on the page, and add the ability to put a "tick" somewhere in the admin panel, and already filter by this field. I can do the same with the elements of the info block, and a lot of examples, but when it comes to sections, here already a problem.
Most likely through "Additional fields, but how to filter by it .."
Tell me please,

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Emelyanov, 2018-07-23
@jorshjorsh95

https://dev.1c-bitrix.ru/api_help/iblock/classes/c...

$arFilter = array(
            "IBLOCK_ID" => "1",
            "UF_PROP" => "123" 
        );
$res = CIBlockSection::GetList($arSort, $arFilter, false, $arSelect);

Filtration options:
Дата со временем:
"UF_"код_поля => '08/08/2014 09:33:00' где "08/08/2014 09:33:00" в том формате, в котором хранится значение
Дата
"UF_"код_поля => '08/08/2014',
Файл
"UF_"код_поля =>6725, где 6725 - идентификатор файла
Шаблон 
"UF_"код_поля =>'61'
Опрос
"UF_"код_поля =>3, где 3 - идентификатор опроса.
Текстовые, числовые поля
"UF_"код_поля => значение
Привязки
"UF_"код_поля => ID элемента(раздела)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question