Twig template variables not displaying?

I access the twig instance, and render the template like so:

return $this->template->render('login.html', array(
    'name' => 'John Smith',
    'age' => 32,
    'location' => 'Egypt'

Here is the template side of things

Hello, my name is {{ name }}, my age is {{ age }}, and my location is {{ location }}.

Currently prints out

Hello, my name is , my age is , and my location is .

Should print out

Hello, my name is John Smith, my age is 32, and my location is Egypt.

1 answer