Developer forum

Forum » Ecommerce - Standard features » Control page size with URL parameters

Control page size with URL parameters

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a situation where I need to combine products with banner ads in a page.

The challenge is that we try to configure the banners to be the size of one Product slot or 2 Product slots but not all pages will have banners.

My question is if I can ask for products with a start position and end position instead of PageNum as I might need 9 products for the first page and 10 products for the subsequent pages.

Of course, this means that I will have to implement infinite scroll as the pagination will be very affected.

I have no other idea how to solve this but I am opened to suggestions if anybody has alternatives.

Thank you,

Adrian

 


Replies

 
Nicolai Pedersen
Reply

Pagenum and pagesize together can do some of that for you.

Getting 1-9: Pagenum=1&pagesize=9

Getting 10-20: Pagenum=2&pagesize=10

Getting 53-63 is a bit more difficult as 53 is a prime number, so it does not break into other pagesizes than 1 and 53.

Getting 12-17 is also difficult. You get the  point.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you very much. This is very useful information.

I don't think that we will get more than 10 pages for most of the categories, which means that we should be on the safe side with this approach.

Thank you,


Adrian

 

You must be logged in to post in the forum