Hi,
i just started to play around SS. I have a little problem which, i guess, can be easy solved.
I install countries, which i can chose in the admin system, but i can't get this country name in the templates, because i got just it ID from variable $CountryID.
Any ideas how to declarate country title from it ID.
class Lake extends Lakes {
static $db = array(
'CountryID' => 'Int'
);
static $has_one = array(
'Countries' => 'Country'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Country',new DropdownField('CountryID','Select one',DataObject::get('Country')->toDropDownMap('ID', 'Title')));
return $fields;
}
}
Thank you,
Vitas