There seems to be a small issue with the default number of items setting in views being respected by Panels. The problem is that, despite whatever setting you provide as the default in the views configuration for number of items, when you add the item *for the first time) to Panels it defaults the "Num Items" to 10.
I tested this with Drupal 7.14, Panels 3.x-dev, and Views 3.3. Here is the general problem:
-- Set the number of items in the views configuration (https://drupal.org/files/panels-num-items-view-conf.png)
-- Try to add it to Panels (https://drupal.org/files/panels-num-items-result.png)
I have attached my .view if it is needed by others to replicate the problem.
For what it is worth, I have also tested the patch in #1091554: 'num posts' setting not respected when overriding view options unless pager is used but that doesn't seem to help this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 1690188-dynamic-number-items-per-page.patch | 645 bytes | mukhsim |
| #2 | 1690188-fix-items-per-page-stuff.patch | 6.06 KB | merlinofchaos |
| #1 | 1690188-fix-items-per-page-stuff.patch | 6.09 KB | merlinofchaos |
| panels-num-items-view-conf.png | 124.93 KB | populist | |
| panels-num-items-result.png | 27.56 KB | populist |
Comments
Comment #1
merlinofchaos commentedLooks like not all of the pager stuff was properly upgraded to Views 3, which is the only version available for Drupal 7. This patch seems to fix it.
Comment #2
merlinofchaos commentedNow without debugging messages.
Comment #3
populist commentedLooks great! This will certainly help Drupal products provide better out of the box experiences.
Comment #4
merlinofchaos commentedCommitted to 7.x.
And just realized that this was filed against Panels but it's a CTools fix.
Comment #6
mukhsim commentedI know that this is a slightly different issue, but is it possible to patch Ctools to allow using tokens in a View pane settings?
I am particularly interested in dynamic Items Per Page (Num Items) setting to be provided by a custom field (%term:field_num_items, for example), instead of a static number, such as 10.
Will any issues arise if we wrap $conf['items_per_page'] or other settings, with ctools_context_keyword_substitute() function?
Please see attached patch.
Comment #7
mukhsim commentedChanged issue status to Needs review.
Comment #8
dalin@mukhsim, please open a new issue since your patch is completely unrelated to this one.
Comment #8.0
dalinAdding information about the .view that is included.
Comment #9
kopeboyHow is this fixed?!
I still always see "Num items: 10" as default in any Views Content Pane.