#set ($spaceKey = $!sitemeshPage.getProperty("page.spacekey"))

<meta id="confluence-context-path" name="confluence-context-path" content="$req.contextPath">
<meta id="atlassian-token" name="atlassian-token" content="${xsrfTokenGenerator.generateToken($req)}">
#if ($spaceKey)
<meta id="confluence-space-key" name="confluence-space-key" content="$spaceKey">
#end

<script type="text/javascript">
    // Deprecated global variables. To be removed in a future version of Confluence.
    var contextPath = '$req.contextPath';
    var i18n = [];
</script>

## todo refactor this out - should only be included where needed
#requireResource("confluence.web.resources:atlassian-effects")

<!-- include system resources -->
$webResourceManager.getResources()
<!-- end system resources -->

#if ($stylesheetAction == "admin")
    <link rel="stylesheet" href="$webResourceManager.globalCssResourcePrefix/styles/admin.css" type="text/css">
#elseif ($spaceKey)
    <link rel="stylesheet" href="$webResourceManager.getSpaceCssPrefix($spaceKey)/styles/combined.css?spaceKey=$generalUtil.htmlEncode($spaceKey)" type="text/css">
#else
    <link rel="stylesheet" href="$webResourceManager.globalCssResourcePrefix/styles/combined.css" type="text/css">
#end

#if (!$sitemeshPage.getProperty("page.allowindex"))
    <meta name="robots" content="noindex,nofollow">
    <meta name="robots" content="noarchive">
#end
#if ($req.getAttribute("Confluence-Request-Time"))
    <meta name="confluence-request-time" content="$!req.getAttribute("Confluence-Request-Time")">
#end

#favicon()        

#if ($settingsManager.globalSettings.enableOpenSearch)
<link rel="search" type="application/opensearchdescription+xml" href="$req.contextPath/opensearch/osd.action" title="$generalUtil.htmlEncode($!settingsManager.globalSettings.siteTitle)"/>
#end
#if ($sitemeshPage.getProperty("page.rssautodiscovery"))
    $sitemeshPage.getProperty("page.rssautodiscovery")
#end
#if ($sitemeshPage.getProperty("page.headsection"))
    $sitemeshPage.getProperty("page.headsection")
#end

