Getting Twig_Error_Runtime when trying to open the website I am trying to set up a Craft CMS website with Twig. I have done all the setup but getting the following error when I try to open the website- 



Twig_Error_Runtime

Variable "global" does not exist in "503" at line 9 (C:\wamp64\www\west\craft\app\vendor\twig\twig\lib\Twig\Template.php:436)

#0 C:\wamp64\www\west\craft\storage\runtime\compiled_templates\00\0009102817a5d89769207212bd179d422974c0400e0d4db894ad4fd45f35fd9d.php(29): Twig_Template-&gt;getContext(Array, 'global')
#1 C:\wamp64\www\west\craft\app\vendor\twig\twig\lib\Twig\Template.php(381): __TwigTemplate_37e5d62204d15e3586ae79a226d2d0e58f18084c697fef1d38e94cf3b75f8fb0-&gt;doDisplay(Array, Array)
#2 C:\wamp64\www\west\craft\app\etc\templating\BaseTemplate.php(26): Twig_Template-&gt;displayWithErrorHandling(Array, Array)
#3 C:\wamp64\www\west\craft\app\vendor\twig\twig\lib\Twig\Template.php(355): Craft\BaseTemplate-&gt;displayWithErrorHandling(Array, Array)
#4 C:\wamp64\www\west\craft\app\vendor\twig\twig\lib\Twig\Template.php(366): Twig_Template-&gt;display(Array)
#5 C:\wamp64\www\west\craft\app\vendor\twig\twig\lib\Twig\Environment.php(347): Twig_Template-&gt;render(Array)
#6 C:\wamp64\www\west\craft\app\services\TemplatesService.php(248): Twig_Environment-&gt;render('503', Array)
#7 C:\wamp64\www\west\craft\app\controllers\BaseController.php(74): Craft\TemplatesService-&gt;render('503', Array)
#8 C:\wamp64\www\west\craft\app\controllers\TemplatesController.php(200): Craft\BaseController-&gt;renderTemplate('503', Array)
#9 C:\wamp64\www\west\craft\app\framework\web\actions\CInlineAction.php(49): Craft\TemplatesController-&gt;actionRenderError()
#10 C:\wamp64\www\west\craft\app\framework\web\CController.php(308): CInlineAction-&gt;runWithParams(Array)
#11 C:\wamp64\www\west\craft\app\framework\web\CController.php(286): CController-&gt;runAction(Object(CInlineAction))
#12 C:\wamp64\www\west\craft\app\framework\web\CController.php(265): CController-&gt;runActionWithFilters(Object(CInlineAction), Array)
#13 C:\wamp64\www\west\craft\app\framework\web\CWebApplication.php(282): CController-&gt;run('renderError')
#14 C:\wamp64\www\west\craft\app\framework\base\CErrorHandler.php(368): CWebApplication-&gt;runController('templates/rende...')
#15 C:\wamp64\www\west\craft\app\etc\errors\ErrorHandler.php(281): CErrorHandler-&gt;renderError()
#16 C:\wamp64\www\west\craft\app\framework\base\CErrorHandler.php(351): Craft\ErrorHandler-&gt;renderError()
#17 C:\wamp64\www\west\craft\app\framework\base\CErrorHandler.php(218): CErrorHandler-&gt;renderException()
#18 C:\wamp64\www\west\craft\app\etc\errors\ErrorHandler.php(145): CErrorHandler-&gt;handleException(Object(Craft\HttpException))
#19 C:\wamp64\www\west\craft\app\framework\base\CErrorHandler.php(131): Craft\ErrorHandler-&gt;handleException(Object(Craft\HttpException))
#20 C:\wamp64\www\west\craft\app\framework\base\CApplication.php(750): CErrorHandler-&gt;handle(Object(CExceptionEvent))
#21 [internal function]: CApplication-&gt;handleException(Object(Craft\HttpException))
#22 {main}




Here's the code from where the exception is thrown-

&lt;title&gt;        
    echo twig_escape_filter($this-&gt;env, $this-&gt;getAttribute((isset($context["global"]) ? $context["global"] : $this-&gt;getContext($context, "global")), "siteName", array()), "html", null, true);
    &lt;/title&gt;


Template 503 - 



&lt;!doctype html&gt;
&lt;html class="no-js" lang="en"&gt;
&lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;
    &lt;meta name="robots" content="noindex"&gt;

    &lt;title&gt;{{ global.siteName }}&lt;/title&gt;
&lt;/head&gt;
&lt;body style="height: 100%; margin: 0;"&gt;

    &lt;h1 style="text-align:center; margin: 100px 0 100px;"&gt;{{ global.siteName }}&lt;/h1&gt;

&lt;/body&gt;&lt;/html&gt;
siteName is automatically global... you don't need to include the global. prefix.

&lt;title&gt;{{ siteName }}&lt;/title&gt;