Skip html line in Twig -
i have not used twig before , rise wit problem need skip full line in twig is
my html
<h4 class="title">{{ 'publish' | translate }}</h4>
in index
require_once('lib/twig/autoloader.php'); twig_autoloader::register(); $loader = new twig_loader_filesystem('views'); $twig = new twig_environment($loader, array( //'cache' => 'cache', 'auto_reload' => true ));
when render html twig error because of translate. need advice how tell twig skip these line not change symbol in html (maybe tag "translate")
add fake filter translate
$twig->addfilter(new twig_simplefilter('translate', function($v) {return $v;}));
Comments
Post a Comment