I’m working with ZfcTwig on a project and I was wondering how one could disable autoescape for all templates in the configuration. Since the documentation of ZfcTwig is not the best and I’m new to it, it took me a moment to figure it out.
You can pass all config variables to Twig in your
Application/config/module.config.php by adding the following to the end:
return array( 'router' => array( .... ), ... 'zfctwig' => array( 'environment_options' => array( 'autoescape' => false, ), ), );
Notice how you have to wrap all Twig configuration settings in
environment_options. Reload the page and all variables and placeholders will be shown as