Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
class TeamPage extends Page {
private static $db = array(
private static $has_one = array(
'Photo' => 'Image'
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Main", new UploadField('Photo'),'Content');
return $fields;
class TeamPage_Controller extends Page_Controller {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment