VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: Henrik Holm Nielsen on September 15, 2016, 15:52:55 PM

Title: How to limit number of shown boxes in pagination?
Post by: Henrik Holm Nielsen on September 15, 2016, 15:52:55 PM
Hi,

Using J3.6.2 with VM 3.0.16 and 3.0.17.4 - how do I limit the number of shown boxes to click in the pagination?
In attached screenshot, I have the boxes "Start", "Prev" and then numbers 1 to 10, before "Next", "End".

This means the pagination is wider than most smartphones, in portrait mode.

So if I would like to just have "Start", "Prev" and then numbers 1-4 before "Next", "End" - how do I accomplish this?

I've been fiddlling with the "Pagination sequnece" in Configuration -> Templates, but this does not seem to cover what I would like to do.

Any ideas besides using css to either scale or style the content very small?

Cheers
Title: Re: How to limit number of shown boxes in pagination?
Post by: Ghost on September 16, 2016, 07:59:24 AM
You need to modify pagination.php file in your template's html directory.
Title: Re: How to limit number of shown boxes in pagination?
Post by: Henrik Holm Nielsen on September 16, 2016, 11:39:30 AM
Ghost,

I'm sorry - but can you clarify a little bit?

I have no pagination.php in my entire VM install, as far as I can see?
I do have a vmpagination.php located in /administrator/components/com_virtuemart/helpers - but im assuming I can't override this?

Also assuming the Joomla core/template pagination.php is not being picked up by Virtuemart?

Or have I misunderstood?
Title: Re: How to limit number of shown boxes in pagination?
Post by: Ghost on September 16, 2016, 11:51:13 AM
VM uses Joomla pagination which can be overridden by your template. Check if there's pagination override in /templates/your_template/html/. If it doesn't exist, create it. Then modify it to your liking.

Here's an example how to have just previous/next buttons (Step #4) https://www.ostraining.com/blog/joomla/page-break-viral/.
Title: Re: How to limit number of shown boxes in pagination?
Post by: Henrik Holm Nielsen on September 16, 2016, 11:55:45 AM
Fantastic - I did not know VM now used Joomla pagination!

Thanx for this and for the link - I'll dive into this asap!

Cheers mate!