/** * Generate */ protected function compile() { if (!$this->pages) { return ''; } global $objPage; $objOnePageWebsite = new OnePageWebsite(); $objOnePageWebsite->set('hardLimit', $this->hardLimit); $objOnePageWebsite->set('showLevel', $this->showLevel); $arrPages = deserialize($this->pages); if (!is_array($arrPages)) { $arrPages = array($arrPages); } foreach ($arrPages as $pid) { // add pages to template #fix 4 $this->Template->items .= $this->OnePageWebsite->generatePage($pid, 0, $this->opw_template); } }
/** * Generate */ protected function compile() { global $objPage; $objOnePageWebsite = new OnePageWebsite(); $objOnePageWebsite->set('hardLimit', $this->hardLimit); $objOnePageWebsite->set('showLevel', $this->showLevel); $startPage = ''; $trail = $objPage->trail; $level = 0; if (!$this->defineRoot || $this->rootPage == $trail[0]) { $startPage = $objPage->id; } else { if ($this->defineRoot && $this->rootPage > 0) { $startPage = $this->rootPage; } else { } } // add pages to template #fix 4: $this->Template->items = $objOnePageWebsite->generatePage($startPage, $level, $this->opw_template); }