/** * 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); }