Example #1
0
 private function renderPage($sUrl)
 {
     // Build page object
     $oPage = new Page($sUrl, $this->sConfigFile);
     $oPage->build();
     // Get the theme
     $sTheme = $this->_oConfig->get('site', 'theme');
     $oTheme = new Theme($sTheme, $this->sConfigFile);
     // Add assets, blocks and config
     $oTheme->setPageConfig($oPage->getConfig());
     $oTheme->addBlocks($oPage->getBlocks());
     $oTheme->addAssets($oPage->getAssets());
     // Add page list for menus
     $sPath = $this->_oConfig->getPath('pages');
     $oFilesystem = new Filesystem();
     $aPageList = $oFilesystem->getAllPagesInDir($sPath, '', $this->sConfigFile);
     $oTheme->setSitemapInfo($this->determineUrl(), $aPageList, $oPage->getChildren());
     return $oTheme->renderPage();
 }