Keyword

Bug with pagination?

  • jfreeze
  • jfreeze's Avatar Topic Author
  • Offline
  • New Member
More
14 years 8 months ago #77550 by jfreeze
Bug with pagination? was created by jfreeze
I noticed today when working with k2.2.2 that the pagination was not working as expected.

Specifically I expected that if Pagination was set to "auto" for a category that means that thediv would only display if pagination was needed. However that was not the case. It was showing even when pagination was not needed (it was empty between the div tags).

A look at the code shows that it is doing a IF statement checking for the the results of count($this->pagination->getPagesLinks()).

Apparently the "count" was 1 or higher because even when there was no pagination needed it was returning true on this IF statement and generating the DIV.

To fix this, and get it working the way I expected, I simply removed the count() function from the IF statement, leaving me this:

if($this->pagination->getPagesLinks()) :

This only returned TRUE if there was pagination needed and returned FALSE when none was needed, producing the results I expected.

So either this is a bug, or my expectations were wrong.

Hope this helps someone and gets fixed if its a bug.

James

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #77551 by sjsmit
Replied by sjsmit on topic Bug with pagination?
I had the same problem and removing 'count' and the ( and ) solved it.

Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 1 week ago #77552 by EasiStudio
Replied by EasiStudio on topic Bug with pagination?
I am using 2.4.1 and have the same issue with <div class="k2Pagination"> appearing when pagination and pagination results are set to hide. No pagination actually appears but dirty big and rather annoying space.

 

I am using template overrides and tried the above solution of removing the count in the category.php file in my template override directory but it had no effect.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum