Hi Everyone
I'm pretty new on ModelAdmin, but it's up and running and really great. However, instead of having this boring message: " Welcome to SilverStripe CMS. Please choose one of the entries in the left pane", I would like to show a list in the right pane based on the data in my ModelAdmin.
These are my files:
<?php
class RegionsAdmin extends ModelAdmin {
protected static $managed_models = array(
'Region'
);
static $url_segment = 'regioner'; // will be linked as /admin/mycrm
static $menu_title = 'Regions';
}
?>
<?php
class Region extends DataObject {
static $db = array(
'Navn' => 'Text',
'Hovedstad' => 'Text',
'Areal' => 'Text',
'Indbyggere' => 'Text',
'Vine' => 'Text'
);
static $searchable_fields = array(
'Navn',
'Hovedstad',
'Areal',
'Indbyggere',
'Vine'
);
static $summary_fields = array(
'Navn',
'Hovedstad',
'Vine'
);
function getCMSFields() {
$fields = parent::getCMSFields();
return $fields;
}
}
?>
But how do I create a list based on my Regions class?
Joel