Answer the question
In order to leave comments, you need to log in
How to display elements of a certain section of an infoblock on Bitrix?
Guys, tell me how you can display the elements of a certain section of the infoblock?
I found this code online:
<?
CModule::IncludeModule("iblock");
$BID = 2; //ID инфоблока
$SID = 2; //ID секции
$result = CIBlockElement::GetList(
Array("ID"=>"DESC"),
Array("IBLOCK_ID"=>IntVal($BID), "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y","SECTION_ID"=>$SID),
false,
Array("nPageSize"=>3),
Array("ID", "NAME", "DETAIL_PAGE_URL")
);
while($arResultmy = $result->GetNext()){
echo '<div>'.$arResultmy['NAME'].'</div>';
}
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question