G
G
Good Samaritan2020-04-13 22:02:24
1C-Bitrix
Good Samaritan, 2020-04-13 22:02:24

Why is the getlist called in the component template not working?

The following code does not work in the template of some custom component

$arSelect = Array("ID", "NAME", "DETAIL_PAGE_URL");
$arFilter = Array("IBLOCK_ID"=>43,  "ACTIVE"=>"Y", "SECTION_ID"=>1384);
$res = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>50), $arSelect);
while($ob = $res->GetNextElement())
{
  $arFields = $ob->GetFields();
  print_r($arFields);
}

Moreover, the section exists and there are elements in it. Generally does not fulfill the request. Dropped cache.

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