Copy config/smarty.global.php to your config/autoload/ directory.
$ cp vendor/ngyuki/zf2-smarty/config/smarty.global.php config/autoload/
Fix config/autoload/smarty.global.php
<?php
return array(
'smarty' => array(
// ...
),
);
Add ZendSmarty
in your application.config.php
<?php
return array(
'modules' => array(
'Application',
'ZendSmarty', // this is it!
),
// ...
);
{* simple with echo (not support method chain) *}
{url bar [id => 12345]}
{* simple without echo (not support method chain) *}
{do headTitle "Index Page"}
{* method chain *}
{$this->headTitle("ZF2 Smarty")->setSeparator(' - ') nofilter}