Answer the question
In order to leave comments, you need to log in
How to add pagination to the Bitrix catalog component?
Bitrix has many solutions for the catalog, however, none of those that came out began to display pagination.
bitrix:catalog.top - if this one had the ability to page-by-page navigation, then you wouldn't have to ask.
catalog components with navigation: Section elements and List of related elements for some reason do not plow
. it understands #SECTION_CODE_PATH#
The task is as follows:
news 1,
news2,
news3,
...
there 1,2,3 ... here
Which of the components works best with this?
MORE DETAILS
_ _
On the main page, you need to display all the news with infinite scrolling, on the page of the news section, I have already done it. left to add to the main.
Answer the question
In order to leave comments, you need to log in
Any complex works well with this.
And just "List of News" also works with this. You need to enable in the settings "Show pagination from the bottom" and select a template
If we are talking about news without sections - use the complex News component, enable Pagination in the call settings of this component.
If you have news with sections - use the complex Catalog component, but clean the template well from unnecessary code and turn off the use of JS in the component. In the same component, in its call settings, enable Pagination.
Go here /bitrix/templates/your template/components/bitrix/news.list/news.news-list,
Open the template.php file,
Add
<this>-------------- -------------------------------------------------
< ?
if( ($key+1) % 4 == 0 )
{
echo "";
}
if( ($key+1) % 3 == 0 )
{
echo "";
}
?>
<this>---------------------------------------------------- --------------------
<this>
<?if($arParams["DISPLAY_BOTTOM_PAGER"]):?>
<?=$arResult["NAV_STRING"]?>
<?endif;?>
<this>-------------- -------------------------------------------------- -
And you will have normal pegylation
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question