notes for Add checkbox in cms for style changes in silverstripe:
TestPage.php
static $db = array ( 'checker' => 'boolean' ); public function getGeneratedCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldToTab("Root.Main", CheckboxField::create('checker', _t('TestPage.CHECKER', 'remove yellow frame')), 'Content'); return $fields; } public function getCMSFields() { $fields = $this->getGeneratedCMSFields(); return $fields; }
TestPage.ss
<% if $checker %> $rechts <% else %> <div class="panel-type"> $rechts </div> <% end_if %>