Hello everyone,
I'm working on a website with silverstripe, and I'm running into a problem. I'm trying to add a new tab with 2 fields on multiple pagetypes (like 20), and on 6 of them, the fields are not added after flushing. The stupid thing is that the pages are 99% equal to eachother, except for the fieldnames.
It there something that can prevent silverstripe from adding the fields to the cms when flushing?
The code I've used:
class HistoriePage extends SiteTree
{
static $db = array(
'BlauwKopHistorie' => 'Varchar(100)',
'BlauwContentHistorie' => 'Varchar(255)',
);
function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.BlauwVeld", new TextField('BlauwKopHistorie', 'Koptekst'));
$fields->addFieldToTab("Root.Content.BlauwVeld", new TextField('BlauwContentHistorie', 'Inhoud'));
return $fields;
}
public static $has_one = array(
);
}
class HistoriePage_Controller extends ContentController
{
public function init() {
parent::init();
// Note: you should use SS template require tags inside your templates
// instead of putting Requirements calls here. However these are
// included so that our older themes still work
// Requirements::themedCSS("layout");
// Requirements::themedCSS("typography");
// Requirements::themedCSS("form");
i18n::set_locale('nl_NL');
}
}
Thanks in advance,
Xander