, and * tags. This code fixes that. * * There is probably a better way to do this! */ protected function startHTML() { jimport('joomla.filesystem.file'); require_once JPATH_BASE.'/libraries/joomla/document/html/renderer/head.php'; $document = JFactory::getDocument(); $this->assignRef('document', $document); $app = JFactory::getApplication(); $this->template = $app->getTemplate(true)->template; $template_dir = $this->baseurl.'/templates/'.$this->template; $file ='/templates/system/css/system.css'; if (JFile::exists(JPATH_SITE.$file)) { $document->addStyleSheet($this->baseurl.$file); } // Try to add the typical template stylesheets $files = Array('template.css', 'position.css', 'layout.css', 'general.css'); foreach($files as $file) { $path = JPATH_SITE.'/templates/'.$this->template.'/css/'.$file; if (JFile::exists($path)) { $document->addStyleSheet($this->baseurl.'/templates/'.$this->template.'/css/'.$file); } } // Add the CSS for the attachments list (whether we need it or not) JHtml::stylesheet('com_attachments/attachments_list.css', array(), true); $head_renderer = new JDocumentRendererHead($document); $html = ''; $html .= "\n"; $html .= "\n"; $html .= $head_renderer->fetchHead($document); $html .= "\n"; $html .= "\n"; return $html; } /** * Return the ending HTML tags for the page */ protected function endHTML() { $html = "\n"; $html .= "\n"; $html .= "\n"; return $html; } }