Answer the question
In order to leave comments, you need to log in
Why are elements that do not belong to any section from the infoblock selected with the SECTION_ACTIVE and SECTION_GLOBAL_ACTIVE criteria in the Bitrix filter?
Good evening. There is a code for selecting elements from the infoblock, and in the filter I specified the SECTION_ACTIVE and SECTION_GLOBAL_ACTIVE criteria to exclude elements from the selection that are linked to inactive child sections.
Here is the code:
// Выборка элементов указанных инфоблоков
$rsElement = CIBlockElement::GetList(array(), array("IBLOCK_ID" => $iblock_ids, "ACTIVE" => "Y", "SECTION_ACTIVE" => "Y", "SECTION_GLOBAL_ACTIVE" => "Y"), false, false, $arSelect);
while($arElement = $rsElement->Fetch())
{
$elems[$arElement["IBLOCK_NAME"]][] = $arElement;
}
Answer the question
In order to leave comments, you need to log in
<?
array(
"IBLOCK_ID" => $iblock_ids,
"ACTIVE" => "Y",
array(
"LOGIC" => "OR",
array(
"SECTION_ACTIVE" => "Y",
"SECTION_GLOBAL_ACTIVE" => "Y"
),
array(
"IBLOCK_SECTION_ID" => 0,
)
),
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question