/** * Create the contents of the <head> tag. * * @param PageController $controller The current controller * * @return string */ protected function headContents(PageController $controller) { // The title often includes the names of records, which may include HTML markup. $title = Filter::unescapeHtml($controller->getPageTitle()); // If an extra (site) title is specified, append it. if ($this->tree && $this->tree->getPreference('META_TITLE')) { $title .= ' – ' . $this->tree->getPreference('META_TITLE'); } $html = '<!--[if IE 8]><script src="' . WT_MODERNIZR_JS_URL . '"></script><![endif]-->' . '<!--[if IE 8]><script src="' . WT_RESPOND_JS_URL . '"></script><![endif]-->' . $this->metaCharset() . $this->title($title) . $this->favicon() . $this->metaViewport() . $this->metaRobots($controller->getMetaRobots()) . $this->metaUaCompatible() . $this->metaGenerator(WT_WEBTREES . ' ' . WT_VERSION . ' - ' . WT_WEBTREES_URL); if ($this->tree) { $html .= $this->metaDescription($this->tree->getPreference('META_DESCRIPTION')); } // CSS files foreach ($this->stylesheets() as $css) { $html .= '<link rel="stylesheet" type="text/css" href="' . $css . '">'; } return $html; }