[英]Different Twig and Templates Location in Symfony
In Symfony by default, templates can live in two different locations: 默认情况下,在Symfony中,模板可以位于两个不同的位置:
How can you render Templates also from other Locations? 您如何也可以从其他位置渲染模板?
web/Layouts/layout.twig.html web/Layouts/layout.less ... web / Layouts / layout.twig.html web / Layouts / layout.less ...
web/ app/ Themes/ ... 网络/应用程序/主题/ ...
While you can do that as decribed in define custom filesystem path for twig templates , I would not advertise to put them in the web
directory. 虽然您可以按照定义树枝模板的自定义文件系统路径中所述的方法进行操作 ,但我不会做广告来将它们放在
web
目录中。 Things in the web
directory are publicy available. web
目录中的内容是公开可用的。 Raw templates, before parsing should not be publicy available. 解析前的原始模板不应公开可用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.