Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

ModelAdmin search results limit


6 Posts   1969 Views


13 October 2009 at 10:42am Community Member, 164 Posts

When I do a search in ModelAdmin, the results are limited to 30 by default which is ok. The problem is that I cannot see all of the results because of a bug in the CSS. The outer div does not surround all of the results but seems to cover up the lower ones. I am using SS 2.3.3.


13 October 2009 at 1:10pm Community Member, 283 Posts

Have you tried different browsers? How about tweaking it with Firebug and/or greasemonkey until the fix is applied? You did log/search the open tickets on this, correct?

BLU42 Media

3 November 2009 at 9:35am Community Member, 71 Posts

I ran into the same issue. Apparently this is being changed in 2.4, so you can regard this as a temp patch.

There is a fitToParent javascript call that helps keep everything looking nice but applying overflow:hidden to holder objects. It doesn't apply this if overflow:auto is specifically set, though.... In the case of ModelAdminPanel, this is not set which is keeping the scrollbar from appearing. This fix worked for me and my clients:

First, apply the following code to your init() function in your ModelAdmin class:

function init() {
      #right #ModelAdminPanel{overflow:auto !important;}
      body.ModelAdmin #right{overflow: auto !important;}

Next, you'll need to mod the LeftAndMain.js file. At line 160, comment out the fitToParent function:

//   fitToParent('ModelAdminPanel',-60);

Let us know how it works out for you!



5 December 2009 at 5:13pm Community Member, 36 Posts

Thanks SmartPlugs. Good fix.


2 February 2010 at 5:29pm (Last edited: 2 February 2010 7:23pm), Community Member, 105 Posts

An easier fix is to just add the following to one of your custom css files or as above:


$('#ModelAdminPanel').css('overflow', 'auto');

Personally if I am hacking I like to still leave the core files alone.


10 March 2010 at 7:05am Forum Moderator, 1796 Posts

Hi guys,

Place this in your extended ModelAdmin class...

static $page_length = 10; will limit the results :)