[英]Symfony 2 Impossible to override template FOSUserBundle
I have implemented FOSUser in my project. 我在项目中实现了FOSUser。 And I overloaded the form successfully.
我成功地重载了表单。
Only when I want to override the templates, it doesn't work. 仅当我要覆盖模板时,它才无效。 Yet I respect the views of FOSUser architechture.
但是我尊重FOSUser体系结构的观点。
Do you have an idea of what can be a problem? 您有什么问题的想法吗?
Take a look on documentation: 看一下文档:
https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/overriding_templates.md https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/overriding_templates.md
Basically there are two ways to achieve your goal. 基本上有两种方法可以实现您的目标。 First - simpler, is just put new templates into your app/Resources, for example:
首先-更简单,只需将新模板放入您的应用程序/资源中,例如:
app/Resources/FOSUserBundle/views/Profile/layout.html.twig
The second way is: 第二种方法是:
(...) you can also create a bundle defined as child of FOSUserBundle and place the new template in the same location that is resides in the FOSUserBundle.
(...),您还可以创建一个定义为FOSUserBundle子级的分发包,并将新模板放置在FOSUserBundle中的同一位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.