protected function createControls() { // Regions auslesen $regions = Application::currentPage()->getRegions(); $inhalte = array(); foreach ($regions as $region) { $temp = $region->toHtml(); if ($temp == null) { continue; } if (isset($this->request->permalink)) { $temp->addParam('permalink', $this->request->permalink); } if (isset($this->request->innerPanel)) { $temp->addParam('innerPanel', $this->request->innerPanel); } $inhalte[$region->re_name][] = $temp; } foreach ($inhalte as $name => $region) { $html = ''; foreach ($region as $aktRegion) { $html .= $aktRegion->toHtml(); } $this->controls->setVar($name, $html); } }
protected function createControls() { $rootRegions = Region::loadByPageAndParent(Application::currentPage()->id, 0); foreach ($rootRegions as $region) { $control = $region->getBlock(); if ($control !== null) { $this->add($control); } } }
protected function createControls() { if (!isset($this->request->page)) { $page = Application::currentPage()->id; } else { $page = new Page($this->request->page); } $panel = new StdControls\CaptionedPanelControl($this, 'panel'); $panel->setCaption($page->pa_bezeichnung); $menu = new SiteMenuControl($this, 'submenu'); $menu->setRootPage($page); }
/** * Die Standardwerte f�r die Metadaten werden aus der Konfiguration gelesen. * Wird aktuell eine Seite bearbeitet, ersetzen die bei der Seite definierten * Werte die Standardwerte. Alle Werte k�nnen durch den Controller �berschrieben * werden. * */ public function __construct() { $this->title = Configuration::get('seo.title'); $this->description = Configuration::get('seo.description'); $this->keywords = Configuration::get('seo.keywords'); $this->heading = $this->title; $page = Application::currentPage(); // Page kann auch 0 sein if ($page != null) { if ($page->pa_bezeichnung !== '') { $this->title = $page->pa_bezeichnung; $this->heading = $page->pa_bezeichnung; } if ($page->pa_keywords !== '') { $this->keywords = $page->pa_keywords; } if ($page->pa_description !== '') { $this->description = $page->pa_description; } } }
/** * Gibt zurück, ob diese Seite gerade aktiv ist * @return bool */ public function isActive() { // Application::currentPage() kann auch = 0 sein.. if (Application::currentPage() == null) { return false; } elseif (Application::currentPage()->id == $this->id) { return true; } elseif (Application::currentPage()->isPartOfTree($this->id)) { return true; } else { return false; } }