[drupal-devel] Re: hard coded page sizes

David Reed dreed10 at gmail.com
Wed Oct 12 13:53:42 UTC 2005

I compiled some stats for all core modules calling theme_pager.

- there are 24 calls to theme_pager
- 16 of them are admin type pages
- none of the 16 admin page calls use any kind of override (all hard-coded)
- of the 8 non-admin pages
---4 use the 'default_node_main' variable to override the page size
---1 uses the 'forum_per_page' variable
---1 uses a URL param (comment module)
---1 is hard-coded (tracker)

A variable for admin pages would help but in my case I would like to
show pages like logs in two differnt admin views (with different page
size requirements) so I would need still need a way to override the
variable setting.

On 10/11/05, David Reed <dreed10 at gmail.com> wrote:
> I have a use to expose some of the admin type pages (logs, users etc)
> in a view with limited space available.  I noticed that the page size
> is hard coded in all modules that use drupals paging mechanism.  A
> quick glance reveals the following hard-coded pages sizes:
> watchdog = 50 lines
> user = 50 lines
> statistics = 30 lines
> comment = 50 lines
> poll = 50 lines
> I think it would be really usefull to provide a mechanism to override
> these hard-coded values.  I would suggest something simple like
> apending a value to the url in the query string for page size.  This
> value could be interogated by each module that calls
> theme_pager_link() to see if it should use it's hard-coded default or
> use an override.
> I'm more than happy to provide some patches for this but I wanted to
> make sure I wasn't missing a far easier way to solve this issue.
> Does anyone else see value in this?  Is there a better way to do this
> other than patching the core modules?

More information about the drupal-devel mailing list