Hello,
Started experimenting with ModelAdmin today--neat concept! Ran into difficulty with the create and search buttons that appear in the auto-created add/search/import panel. If I click on either of those buttons, a red "Not Found" error message is displayed at the bottom of the main CMS admin panel. Not good. If I add "Director::addRules(100, array('admin/quotes/$Class/$Action/$ID' => 'QuotesAdmin'));" to my module's _config.php and then click on create or search, the main panel shows the "welcome to SilverStripe now loading" screen.
Would you have any clues as to what I need to do to get create and search working?
I'm running the http://open.silverstripe.com/browser/modules/cms/branches/nestedurls code base on Apache 2.2 running on Win XP.
Thank you,
Ben
-----------
Code:
<?
class QuotesAdmin extends ModelAdmin {
protected static $managed_models = array(
'QuoteModel'
);
static $url_segment = 'quotes';
static $menu_title = 'Quotes';
}
?>
<?
class QuoteModel extends DataObject {
static $db = array(
'Quote' => 'Text',
'Source' => 'Varchar',
'Author' => 'Varchar'
);
static $searchable_fields = array(
'Quote',
'Source',
'Author'
);
}
?>