public function execute()
{
parent::execute();
// load record
$this->loadData();
// add js
$this->header->addJS('jstree/jquery.tree.js', null, false);
$this->header->addJS('jstree/lib/jquery.cookie.js', null, false);
$this->header->addJS('jstree/plugins/jquery.tree.cookie.js', null, false);
// get the templates
$this->templates = BackendExtensionsModel::getTemplates();
// set the default template as checked
$this->templates[$this->record['template_id']]['checked'] = true;
// homepage?
if ($this->id == 1) {
// loop and set disabled state
foreach ($this->templates as &$row) {
$row['disabled'] = $row['has_block'];
}
}
// get the extras
$this->extras = BackendExtensionsModel::getExtras();
$this->loadForm();
$this->loadDrafts();
$this->loadRevisions();
$this->validateForm();
$this->parse();
$this->display();
}