<?php
$val .= '<!DOCTYPE html>
<!--[if !IE]><!-->
<html lang="';

$val .= $scope->locally()->XML_val('ContentLocale', null, true);
$val .= '">
<!--<![endif]-->
<!--[if IE 6 ]><html lang="';

$val .= $scope->locally()->XML_val('ContentLocale', null, true);
$val .= '" class="ie ie6"><![endif]-->
<!--[if IE 7 ]><html lang="';

$val .= $scope->locally()->XML_val('ContentLocale', null, true);
$val .= '" class="ie ie7"><![endif]-->
<!--[if IE 8 ]><html lang="';

$val .= $scope->locally()->XML_val('ContentLocale', null, true);
$val .= '" class="ie ie8"><![endif]-->
<head>
	';

$val .= \SilverStripe\View\SSViewer::get_base_tag($val);
$val .= '
	<title>';

if ($scope->locally()->hasValue('MetaTitle', null, true)) { 
$val .= $scope->locally()->XML_val('MetaTitle', null, true);

}else { 
$val .= $scope->locally()->XML_val('Title', null, true);

}
$val .= ' | ';

$val .= $scope->locally()->obj('SiteConfig', null, true)->XML_val('Title', null, true);
$val .= '</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	';

$val .= $scope->locally()->XML_val('MetaTags', array('false'), true);
$val .= '
	<!--[if lt IE 9]>
	<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->

	<link rel="shortcut icon" href="';

$val .= $scope->locally()->XML_val('ThemeDir', null, true);
$val .= '/images/favicon.ico" />
</head>
<body class="';

$val .= $scope->locally()->obj('ClassName', null, true)->XML_val('ShortName', null, true);
if (!$scope->locally()->hasValue('Menu', array('2'), true)) { 
$val .= ' no-sidebar';


}
$val .= '" ';

if ($scope->locally()->hasValue('i18nScriptDirection', null, true)) { 
$val .= 'dir="';

$val .= $scope->locally()->XML_val('i18nScriptDirection', null, true);
$val .= '"';


}
$val .= '>
';

$val .= \SilverStripe\View\SSViewer::execute_template([["type" => "Includes", 'Header'], 'Header'], $scope->getItem(), array(), $scope, true);

$val .= '
<div class="main" role="main">
		';

$val .= $scope->locally()->XML_val('Layout', null, true);
$val .= '
</div>
';

$val .= \SilverStripe\View\SSViewer::execute_template([["type" => "Includes", 'Footer'], 'Footer'], $scope->getItem(), array(), $scope, true);

$val .= '




</body>
</html>
';

