templateData['page_title'] = 'Foo'; $this->templateData['description'] = 'DocConduit'; $this->templateData['files'] = $files; return $this->render('docs', $this->templateData); } // Route('/docs/file/{file}') public function readfile() { \MVC\Object\Session::createAndTestSession(); $markdown = file_get_contents(DATA_PATH . '/docs/' . $this->file); $my_html = MarkdownExtra::defaultTransform($markdown); $this->templateData['page_title'] = 'Foo'; $this->templateData['description'] = 'DocConduit'; $this->templateData['data'] = $my_html; return $this->render('docs', $this->templateData); } }