English 中文(简体)
试图将控制器放在模板中
原标题:Trying to embed a controller in a template
  • 时间:2011-11-09 09:42:20
  •  标签:
  • symfony

I m trying to embed the login form of FOSUserBundle in a template with this:

{% render "FOSUserBundle::Security::login" %}

但我想到:

An exception has been thrown during the rendering of a template ("Class "FOSUserBundle" does not exist.") in "AibFrontendBundle:General:home.html.twig" at line 6.

我也试图这样做:

{% render "UserBundle::Security::login" %}

but the error is the same (An exception has been thrown during the rendering of a template ("Class "UserBundle" does not exist.").

任何想法?

最佳回答

相反,(ele : after the bundle name):

{% render "FOSUserBundle:Security:login" %}

这一简短的缩略语已扩大到<代码>。 FOSUserBundleController SecurityController:loginAction。 双重殖民地将同方法名称分开。

问题回答

暂无回答




相关问题
Symfony 5, I can t start the server

I develop a symfony project and everything was fine. But since yesterday I can not launch the server: enter image description here The commands symfony server:start and symfony server:stop don t work ...

learning symfony 1.4 will be good when using symfony 2.0?

I know that the architecture is different in symfony 2.0 but im learning 1.4 right now. I wonder if this knowledge i gain about 1.4 will be usable for 2.0 in some extent or will it be a total waste ...

Is symfony 2.0 stable enough to use? [closed]

I wonder if Symfony 2.0 is stable enough to use? Because I ve never used Symfony before. It seems that Symfony 2 is much better than the previous version and I don t want to relearn/recode ...

your experience using symfony 2.0 [closed]

I m going to start a new project that s building web apps from scratch. I have been thinking about using symfony framework for this project. Should I start using symfony 2.0 or stick with 1.4 ? I ...

How to increase the session timeout in Symfony

I would like to know how to increase the session timeout in symfony. Is it enough to only adjust the symfony configuration settings or must I also configure anything in my php.ini file?

How stable or unstable is symfony 2.0? [closed]

Well, I know it s a preview, and I know it says that it s not yet ready for production, and yet I dare ask the question. I need to start building a pretty big application, which is planned to go live ...

热门标签