addHTTPHeader('Content-Type', $this->getMimeType()); $name = $this->getName(); if (!empty($name)) { $this->addHTTPHeader('Content-Disposition', 'attachment; filename="' . $name . '.html"', true); } $template = $this->container->application->getTemplate(); $templatePath = $this->container->application->getContainer()->templatePath . '/' . $template; include $templatePath . '/index.php'; } }