Beispiel #1
0
 /**
  * generateEntry
  *
  * @param   Asset $entry
  *
  * @return  Page
  */
 public function generateEntry(Asset $entry)
 {
     $view = new PageHtmlView();
     $layout = File::stripExtension($entry->getPath());
     $html = $view->setLayout($layout)->render();
     $file = $layout . '.html';
     return new Page($file, $html);
 }
Beispiel #2
0
 /**
  * doExecute
  *
  * @return  mixed
  */
 protected function doExecute()
 {
     $paths = $this->input->getVar('paths', array());
     $view = new PageHtmlView();
     $view->setConfig($this->config);
     $path = $this->config->get('layout.path', $this->app->get('project.path.entries'));
     $view->setPath($path);
     // $view->addPath($this->app->get('project.path.layouts'), Priority::NORMAL);
     $view['path'] = (array) $paths;
     $paths = $paths ? implode('/', (array) $paths) : 'index';
     $this->processor = $processor = $view->setLayout($paths)->render();
     return $processor->getOutput();
 }