Change default Records Per Page in a Multi Record section

17 posts by 4 authors in: Forums > CMS Builder
Last Post: August 9, 2013   (RSS)

Hi All,

In This archived post, http://www.interactivetools.com/forum/forum-posts.php?postNum=2207804 a method is suggested for increasing the default number of records per page from 25.

Basically it suggests opening lib/menus/default/list_functions.php, and on line 70, which reads:

    'perPage'                 => $isRelatedRecords ? $perPage : getFirstDefinedValue( @$_REQUEST['perPage'], 25 ),

Changing the @$schema['_perPageDefault'], 25 ), value of 25 to 1000, and the pull down would then default to 1000 records.

Although that fix worked up through V 2.14, it doesn’t seem to work in version 2.17 or 2.50.

Any thoughts?

Thanks,

Jerry Kornbluth



The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Hi Jerry,

One of the new features of CMS Builder is the ability select how many records are displayed on the list page of a section. If you go to the Section Editor section in the left hand menu, then click modify on a section you want to edit. At the top of the modify section page should be 5 tabs, if you select the advanced tab you should see a per page drop down that allows you to select how many records should be displayed per page. 

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Thanks Greg

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Hi Greg,

This seems to be a per editor solution.

The original hack was a global change.

Any ideas on how to implement a global revision?

Thanks,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By gkornbluth - February 24, 2013 - edited: February 24, 2013

I agree that giving the client the flexibility is important, but I still would like to find a global change.

The original global fix set the default value to 1000 but still allowed the client to choose other valuers from the pull down.

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Hi Jerry, 

The number of items displayed per page has been moved into the schema file for each section, so there isn't a global you can change that will update all of the sections with the same perPage value. 

You could try using an IDE or text editor to search through the schema files and replace '_perPageDefault' => '25', with  '_perPageDefault' => '1000'.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Thanks Greg,

I'll give that a try.

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By Dave - February 25, 2013

Hi Guys,

Also, if you add/update the same setting in /schemaPresets/ then every new section you create will get that default.

For example, I added this to /schemaPresets/customMulti.ini.php

  '_perPageDefault' => '1000',

And then added a new "Multi Record" section and it had that default.

Let me know if that works, or if you like I can make you a little plugin to reset them all.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

Hi Dave,

Thanks for the pointer.

A plugin would really be great.

Thanks for the offer.

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php