I'm working through the examples at http://doc.silverstripe.org/framework/en/reference/cms-architecture. So far I have a MyAdmin class and I have MyAdmin_Content.ss, MyAdmin_Tools.ss and MyAdmin_EditForm.ss displaying. However, when I click to another section of the CMS, e.g. Pages. My screen doesn't redraw and the MyAdmin templates remain. Is there some addtional markup or JavaScript required beyond the LeftAndMain class and the MyAdmin_*.ss templates?
MyAdmin.php:
class MyAdmin extends LeftAndMain {
static $url_segment = 'myadmin';
static $url_rule = '$Action/$ID';
static $menu_title = 'My Admin';
static $menu_priority = 60;
public function getEditForm($id = null, $fields = null) {
$fields = new FieldList(new ReadonlyField('id #', $id));
$actions = new FieldList(new FormAction('go'));
return new Form($this, "EditForm", $fields, $actions);
}
}
MyAdmin_Content.ss:
<div class="cms-content center ss-tabset" data-layout-type="border">
<div class="cms-content-header north">
<div class="cms-content-header-info">
Some header stuff
</div>
</div>
$Tools
<div class="cms-content-fields center ui-widget-content" data-layout-type="border">
$EditForm
</div>
</div>