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.

Comments

merlinofchaos’s picture

Status: Active » Needs review
StatusFileSize
new6.09 KB

Looks 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.

merlinofchaos’s picture

StatusFileSize
new6.06 KB

Now without debugging messages.

populist’s picture

Status: Needs review » Reviewed & tested by the community

Looks great! This will certainly help Drupal products provide better out of the box experiences.

merlinofchaos’s picture

Project: Panels » Chaos Tool Suite (ctools)
Version: 7.x-3.x-dev » 7.x-1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed to 7.x.

And just realized that this was filed against Panels but it's a CTools fix.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mukhsim’s picture

StatusFileSize
new645 bytes

I 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.

mukhsim’s picture

Status: Closed (fixed) » Needs review

Changed issue status to Needs review.

dalin’s picture

Status: Needs review » Closed (fixed)

@mukhsim, please open a new issue since your patch is completely unrelated to this one.

dalin’s picture

Issue summary: View changes

Adding information about the .view that is included.

kopeboy’s picture

Version: 7.x-1.x-dev » 7.x-1.9
Issue summary: View changes
Status: Closed (fixed) » Needs work

How is this fixed?!

I still always see "Num items: 10" as default in any Views Content Pane.