Forum

Thread tagged as: Question, Problem, Configuration

Pagination on one template affects another list on page

I've got a list and detail page with list pagination to shorten a list....

          // List mode
          perch_content_custom('Area', array(
               'template' => 'my_listing.html',
          'paginate' => true,
          'count' => 12,
          )); 

However when navigating the pagination, a category list feed lower on the same page (where I only want the first 6 item shown) loads the next 6 categories, and the next 6 until finally running out of content altogether.

Can i prevent second list from paginating also?

'template'   => 'my_other_list.html',
 'set' => 'mycategory',
'sort-order'=>'RAND',
'count' => 6,
'paginate' => false,
David Owen

David Owen 0 points

  • 4 years ago

It looks like it's the presence of 'count' => 6, on the second list is the problem.

Any workaround for this?

Drew McLellan

Drew McLellan 2638 points
Perch Support

You need to set them to use a different pagination variable - they're both responding to the same URL argument.

How/where do I change page for query string ?page=2

...found it...

pagination-var The URL query string parameter name to use for the page number. Defaults to page.