Ejemplo n.º 1
0
 /**
  * Parse
  *
  * @return	void
  */
 protected function parse()
 {
     // set
     $this->record['url'] = $this->meta->getURL();
     if ($this->id == 1) {
         $this->record['url'] = '';
     }
     // parse some variables
     $this->tpl->assign('item', $this->record);
     $this->tpl->assign('templates', $this->templates);
     $this->tpl->assign('blocks', $this->blocks);
     $this->tpl->assign('extrasData', json_encode(BackendPagesModel::getExtrasData()));
     $this->tpl->assign('extrasById', json_encode(BackendPagesModel::getExtras()));
     $this->tpl->assign('prefixURL', rtrim(BackendPagesModel::getFullURL($this->record['parent_id']), '/'));
     // init var
     $showDelete = true;
     // has children?
     if (BackendPagesModel::getFirstChildId($this->record['id']) !== false) {
         $showDelete = false;
     }
     if (!$this->record['delete_allowed']) {
         $showDelete = false;
     }
     // show deletebutton
     $this->tpl->assign('showDelete', $showDelete);
     // assign template
     $this->tpl->assignArray($this->templates[$this->record['template_id']], 'template');
     // parse the form
     $this->frm->parse($this->tpl);
     // parse datagrids
     $this->tpl->assign('revisions', $this->dgRevisions->getNumResults() != 0 ? $this->dgRevisions->getContent() : false);
     $this->tpl->assign('drafts', $this->dgDrafts->getNumResults() != 0 ? $this->dgDrafts->getContent() : false);
     // parse the tree
     $this->tpl->assign('tree', BackendPagesModel::getTreeHTML());
 }
Ejemplo n.º 2
0
 /**
  * Parse
  *
  * @return	void
  */
 protected function parse()
 {
     // parse some variables
     $this->tpl->assign('templates', $this->templates);
     $this->tpl->assign('blocks', $this->blocks);
     $this->tpl->assign('extrasData', json_encode(BackendPagesModel::getExtrasData()));
     $this->tpl->assign('extrasById', json_encode(BackendPagesModel::getExtras()));
     $this->tpl->assign('prefixURL', rtrim(BackendPagesModel::getFullURL(1), '/'));
     // get default template id
     $defaultTemplateId = BackendModel::getModuleSetting($this->getModule(), 'default_template', 1);
     // assign template
     $this->tpl->assignArray($this->templates[$defaultTemplateId], 'template');
     // parse the form
     $this->frm->parse($this->tpl);
     // parse the tree
     $this->tpl->assign('tree', BackendPagesModel::getTreeHTML());
 }