0

I am just learning twig. This is my code:

<?php
 require_once '../vendor/autoload.php';
 $loader = new Twig_Loader_Filesystem('../views/');
 $twig = new Twig_Environment($loader);

 echo $twig->render(
  'front.twig.html',
  array(
    'slogan' => 'Learning Twig So I Can Theme Grav CMS',
  )
);

?>

It does not render my template. I am using the code from an online tutorial. I believe my file system is correct and I have properly installed composer and twig.
What am I doing wrong?

The file produces this output:

render( 'front.twig.html', array( 'slogan' => 'Learning Twig So I Can Theme Grav CMS', ) ); ?> 
β.εηοιτ.βε
  • 33,893
  • 13
  • 69
  • 83
Jim Heil
  • 11
  • 1

0 Answers0