Пример #1
0
 function renderHtml()
 {
     $page = $this->cms->getPage($this->name());
     $navigation = $page['navigation_toplevel'];
     if (!empty($page['http_header_status']) and $page['http_header_status'] == 'HTTP/1.0 404 Not Found') {
         throw new k_PageNotFound();
     }
     $parser = new IntrafacePublic_CMS_HTML_Parser($page);
     $this->document->setTitle($page['title']);
     $this->document->style = $page['css'];
     $this->document->keywords = $page['keywords'];
     $this->document->description = $page['description'];
     $this->document->navigation['html'] = $parser->parseNavigation();
     $this->document->navigation['toplevel'] = $page['navigation_toplevel'];
     if (!empty($page['navigation_sublevel'])) {
         $this->document->navigation['sublevel'] = $page['navigation_sublevel'];
     } else {
         $this->document->navigation['sublevel'] = array();
     }
     $sections = $parser->getSections();
     $headline = $parser->getSection('headline');
     $picture = $parser->getSection('picture');
     $html = $parser->getSection('html');
     $data = array('headline' => $headline['text'], 'html' => $html['html'], 'picture' => $picture['picture']);
     $tpl = $this->template->create('page');
     return $tpl->render($this, $data);
 }