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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

ModelAdmin Limiting the search results


Go to End


6 Posts   2801 Views

Avatar
patjnr

Community Member, 102 Posts

4 December 2009 at 9:19pm

is there any way of limiting the number of results displayed on the CTF in ModelAdmin to 1-10 .... 11-21. currently its just display all my search from 1 to 40 and only 1 to 13 a visible

tx

P

Avatar
CodeGuerrilla

Community Member, 105 Posts

2 February 2010 at 5:33pm

*bump* I would also like to know how to change how many results are shown in the CTF before it begins paging, also while your there how do you make the header fields sortable (onclick)?

Avatar
CraftsMan

Community Member, 35 Posts

11 March 2011 at 11:12am

bump! you guys make any further progress with this?

Avatar
StuM

Community Member, 59 Posts

11 March 2011 at 3:30pm

In your ModelAdmin class add

public static $page_length = 10;

I just found that in ModelAdmin::getResultsTable(), tried on my 2.4.5 install and it worked fine

Avatar
CraftsMan

Community Member, 35 Posts

12 March 2011 at 6:36am

My problem was the pagination wasnt kicking in.
But I realise this is an issue with the PanelModelAdmin I am using.

Avatar
Martijn

Community Member, 271 Posts

26 March 2011 at 8:24am

This should work in panelmodeladmin the same as in
Modeladmin....