CHANGE THE DEFAULT 25 RECORDS PER PAGE ON A RECORD LIST - Mar 7th, 2013


NOTE: You can’t drag a record from one section editor record list page to another because the list is too long to fit
on one page...

So to change the default value of "Per Page" pull down to a higher number (say 1000) and still leave the pull down menu
in tact:

FOR CURRENT VERSIONS (1.17+)

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. Unfortunately this is only a per editor solution.

You can also search through the site's schema files and replace all occurrences of '_perPageDefault' => '25', with
'_perPageDefault' => '1000'.

Or, if you're using Version 2.51 or later, you can implement a global change using the plugin in the recipe called THE
CHANGE RECORDS PER PAGE DEFAULT PLUGIN, which was offered by Dave Edis from Interactive Tools

AND FOR PRIOR VERSIONS

There is a pull down menu on the view records page allowing you to display up to 1000 records per page, but the default
is still 25 records.

Chris from Interactive Tools offered a way to change that default number.

He said:

This value is hard coded in lib/menus/default/list_functions.php. You can change it there, but you'll need to remember
to make the same change again if you ever upgrade CMS Builder.

It should be on line 70:



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


You should be able to change that to any of these values:

5, 10, 25, 50, 100, 250, 1000

You can change the number in the perPage line to whatever value you want provided it's in the drop down list already.


If you want to change the values in the drop down list go to cmsAdmin/lib/menus/default/list.php and find this line of
code:



<?php echo getSelectOptions($metaData['perPage'], array(5, 10, 25, 50, 100, 250, 1000)); ?>


You can add values to this list to add them to the drop down box.

Once you're done this, log out and log back into CMS Builder, you should see you changes.

NOTE: if you upgrade CMS Builder, these changes will be overwritten.



FOR OLDER VERSIONS
Here are the instruction for older versions.

Edit (backup the old file first) this file:
/lib/menus/default/list.php

You can add a new value to the per page list. Just search for "100" and you’ll find:



<option <?PHP selectedIf($listDetails['perPage'], '100')?>>100</option>



Then add a new option to the list. So, if you want 500 records per page to show, then add:



<option <?PHP selectedIf($listDetails['perPage'], '100')?>>100</option>
<option <?PHP selectedIf($listDetails['perPage'], '500')?>>500</option>



or



<option <?PHP selectedIf($listDetails['perPage'], '5000')?> value="5000">All</option>



This will allow you to get the required number of records on a page so that you can drag them up and down at will.



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service