Сниппет CIBlockElement::GetList

Сниппет CIBlockElement::GetList

Простой вывод списка элементов.



CModule::IncludeModule('iblock');

$iblockId = 1;
$arSelect = Array("NAME", "ID", "DETAIL_PAGE_URL", "PROPERTY_*");
$arFilter = Array("IBLOCK_ID" => $iblockId , "ACTIVE" =>  "Y" );
$res = CIBlockElement::GetList(Array('NAME' =>  'ASC'), $arFilter, false, false, $arSelect);
while ($element = $res->fetch()) {
$arElements["ELEMENTS"][] = $element; }