Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maxItems cannot be equal to or smaller than itemsPerPage #142

Open
rabauss opened this issue Oct 6, 2019 · 0 comments
Open

maxItems cannot be equal to or smaller than itemsPerPage #142

rabauss opened this issue Oct 6, 2019 · 0 comments

Comments

@rabauss
Copy link

rabauss commented Oct 6, 2019

Unfortunately, the maxItems cannot be equal to or smaller than itemsPerPage. Finally I broke the items loop in the template, but it would be nice to refactor the logic of Pagination in the following line, so that we can show only maxItems of albums without paging!

if ($this->intItemsPerPage > 0 && (!isset($limit) || $this->intMaxItems > $this->intItemsPerPage)) {

One solution would be:

if (($this->intItemsPerPage > 0 && (!isset($limit) || $this->intMaxItems >= $this->intItemsPerPage)) || isset($limit))

Of course, further refactoring is required in the lines after, due to possible division by zero. But at the moment I don't have the time to analyze the whole method!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant