-
-
Save daslicht/e427dcf26dec599bd484 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ArticlePage extends Page { | |
private static $db = array( | |
'Date' => 'Date', | |
'Author' => 'Text' | |
); | |
public function getCMSFields() { | |
$fields = parent::getCMSFields(); | |
// var_dump($fields); | |
$dateField = new DateField('Date'); | |
$dateField->setConfig('showcalendar', true); | |
$fields->addFieldToTab('Root.Main', $dateField, 'Content'); | |
$fields->addFieldToTab('Root.Main', new TextField('Author'), 'Content'); | |
return $fields; | |
} | |
} | |
class ArticlePage_Controller extends Page_Controller { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment