Skip to content

Instantly share code, notes, and snippets.

@glektrik
Created January 5, 2014 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glektrik/8b8f455a6892f19fb5e7 to your computer and use it in GitHub Desktop.
Save glektrik/8b8f455a6892f19fb5e7 to your computer and use it in GitHub Desktop.
<?php
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