Answer the question
In order to leave comments, you need to log in
How to make pagination in Bitrix in your component?
There is an infoblock with elements. Can you please tell me how to make pagination in the development of your component? It is possible some elementary example which will break elements on 20 elements. If we take the standard news.list component, we'll go to hell to catch what we need and use it in our component.
Answer the question
In order to leave comments, you need to log in
If we take the standard component news.list - we’ll catch the hell out of there
$arFilter = Array("IBLOCK_ID" => 22, "ACTIVE_DATE" => "Y", "ACTIVE" => "Y");
$res = CIBlockElement::GetList(Array(), $arFilter, false, array("nPageSize" => 20), Array());
$res->NavStart(0);
while ($ob = $res->GetNextElement()) {
$product_fields_list = $ob->GetFields();
$product_props_list = $ob->GetProperties();
echo "<pre>";
print_r($product_fields_list);
echo "</pre>";
}
$navStr = $res->GetPageNavStringEx($navComponentObject, "Страницы:", ".default");
echo $navStr;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question