Answer the question
In order to leave comments, you need to log in
How to make pagination in Bitrix top directory?
Tell me how to display the paginator in the TOP in the Bitrix complex component?
Set "TOP_ELEMENT_COUNT" => "20",
// Задаем количество элементов на странице
$countOnPage = 20;
// Исходный массив данных для списка
$elements = $arResult['ITEMS'];
// Получаем номер текущей страницы из реквеста
$page = intval($_GET['PAGEN_1']);
// Отбираем элементы текущей страницы
$elementsPage = array_slice($elements, $page * $countOnPage, $countOnPage);
// Вывод страницы
echo printPage($elementsPage);
// Подготовка параметров для пагинатора
$navResult = new CDBResult();
$navResult->NavPageCount = ceil(count($elements) / $countOnPage);
$navResult->NavPageNomer = $page;
$navResult->NavNum = 1;
$navResult->NavPageSize = $countOnPage;
$navResult->NavRecordCount = count($elements);
// Вывод пагинатора
$APPLICATION->IncludeComponent('bitrix:system.pagenavigation', 'aac', array(
'NAV_RESULT' => $navResult,
));
Answer the question
In order to leave comments, you need to log in
No way.
The component outputs a list of all sections of the top elements.
Pagination in this component is not provided at all.
Now you can only customize the component or write your own with preference and courtesans.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question