$arFilter = Array('IBLOCK_ID'=>1, 'GLOBAL_ACTIVE'=>'Y', 'PROPERTY'=>Array('SRC'=>'https://%'));
$db_list = CIBlockSection::GetList(Array("NAME"=>"desc"), $arFilter, true);
while($ar_result = $db_list->GetNext())
{
echo "<br>".$ar_result['NAME'].'<br>';
//здесь получаю код выборки по секции $ar_result['ID'];
?><p><?
$arSelect2 = array("IBLOCK_SECTION_ID","NAME","PREVIEW_PICTURE","DETAIL_PICTURE","DETAIL_PAGE_URL",);
$arFilter2 = Array("IBLOCK_CODE"=>"ru_press_relizes","IBLOCK_SECTION_ID"=>$ar_result['ID'], "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y");
$res2 = CIBlockElement::GetList(Array(), $arFilter2, false, Array(),$arSelect2);
while($ob2 = $res2->GetNextElement())
{
$arFields2 = $ob2->GetFields();
echo $arFields2["NAME"];
}
?></p><?
}
?>
|