when i use a php-filter-handler it is impossible the number of items to display. The view keeps displaying all items that match the filter.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | views_php_limit.patch | 1.1 KB | amclin |
when i use a php-filter-handler it is impossible the number of items to display. The view keeps displaying all items that match the filter.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | views_php_limit.patch | 1.1 KB | amclin |
Comments
Comment #1
amclin commentedThis is true when using PHP Sort on PHP fields as well. Turning on a pager lets you limit the results per page, but setting a maximum number of results doesn't work.
Comment #2
amclin commentedThe problem is because for Views 2, this module disables the limit so that it can properly allow for sorting and filtering. When done, it should reapply the limit. This isn't an issue with paginated results because they are always unlimited, but for a fixed set of results, this plugin breaks critical functionality.
Here is a patch that solves this issue by trimming the result set if no pager is in use, and a limit for results was provided.
Comment #3
gertieiv commentedtnx, works fine
Comment #4
gertieiv commentedComment #5
amclin commentedgertieiv, Status "Fixed" should only be used once the patch is actually committed.
Comment #6
Nick Robillard commentedInteresting. I'm having this exact problem but with views 3. In my view configs I have limit set to 1 with no pager.
I removed the version check from the patch and it works for me now.
Comment #7
mattcasey commented#2 also works for me, using Views 3 and removing some conditional code for Views 2
Comment #8
harysh commentedThanks a lot for the patch, it worked me for Views 2. One more suggestion i would like to make to add offset value too in the function slice().
Hope this will help someone.
Comment #9
liam morlandIf this applies to a later version, please re-open and update the version.