JPagination in custom dev

For Joomla! 3.x Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general

Moderator: ooffick

Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Post Reply
emedina
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sun Oct 31, 2021 10:28 pm

JPagination in custom dev

Post by emedina » Tue May 24, 2022 2:03 pm

Hello everybody.
Sorry my poor english
I'm developing a custom component. When calling the pagination, always 10 pages results is shown. In global config I set it to 5 pages but, always 10 pages is shown.
In my view.html.php:
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');

Any solution is welcome.

Thanks

emedina
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sun Oct 31, 2021 10:28 pm

Re: JPagination in custom dev

Post by emedina » Wed May 25, 2022 9:03 am

I found the code line where JPagination set the number of pages.
In libraries/cms/Pagination/pagination.php variable $displayedPages is defined with 10 as default value.
Is there any way to override this class? I have tried in template/html/pagination.php but this doesn't do the job

Thank's


Post Reply

Return to “Joomla! 3.x Coding”