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.

Archive /

Our old forums are still available as a read-only archive.

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

ModelAdmin Scaffolding feature

Go to End



Community Member, 33 Posts

9 September 2008 at 11:30am

Edited: 09/09/2008 11:32am

First of all this is a great feature and its saved me a lot of time now I've finally got the hang of most of it. There is one problem I've encountered, as the $searchable_fields are defined in a static array I can't pass contructor parameters to fields like dropdowns etc. I'd like dropdown options in the search for filtering on has_one data.

I made my own class that just hardcoded the arguments I needed but its not that successful and seems to go against the simplicity of the scaffolding system.

In other areas like getCMSFields I can use TypeDropdown to so this, but it requires parameters in order to work (obviously).

Is there any current elegant solution to using dropdowns in the searches?


Edit: While I'm at it is there a simple way to choose which columns are initially checked for search results, one of my DataObjects is also a page type and has loads of extraneous information I'd rather not bother showing :)

Cheers again