我编写了从数据库中获取模板的自定义 Twig 加载器,它在 Twig独立"库中工作.现在我想在 Symfony2 中使用它,但找不到通过 Symfony2 设置更改 Twig 加载器的位置.
I wrote custom Twig loader that fetch templates from database and it works in Twig "standalone" library. Now i want to use that in Symfony2 but can't find where to change Twig loader via Symfony2 settings.
提前谢谢你的任何提示
看看此页面.特别是<parameter key="twig.loader.class">SymfonyBundleTwigBundleLoaderLoader</parameter>
你可以在你的 config.yml 中配置这个键
You can configure this key in your config.yml
上一篇:在WPF ListView的网格线网格、WPF、ListView
下一篇:我可以使用 twig 模板引擎组件显示参数值($_POST、$_GET、$_SESSION、$_SESSION)吗可以使用、组件、模板、参数