FuelPHPでTwigのテンプレートを表示しようとすると下記のようなエラーとなってしまいます。
ErrorException [ Fatal Error ]:
Method Parser\View_Twig::__toString() must not throw an exception
FuelでTwigのテンプレートを表示する方法を教えていただけませんでしょうか。
下記のようなソースでエラーが出ています。
よろしくお願いします。
Controller
fuel/app/classes/controller/sample/index.php
lang
1 public function action_index() 2 { 3 $data = array('title' => 'sample', 'name' => 'taro'); 4 return Response::forge(View_Twig::forge('sample/index', $data)); 5 }
View
fuel/app/views/sample/index.php
lang
1<html> 2 <title>{{ title }}</title> 3</html> 4<body> 5 Hello {{ name }}!! 6</body>
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。