FOSUserBundle: embedding the login form and choosing its template
- by tirengarfio
i want to insert the login form of FOSUserBundle in my template like
this:
<div id="sidebar">
{% render "FOSUserBundle::Security::login" %}
</div>
but not to render the template that is been calling in the code of
loginAction() originally.
I have thought I'd find useful the possibility of passing the template
I want to render as a parameter as 'max' in this example:
<div id="sidebar">
{% render "AcmeArticleBundle:Article:recentArticles" with {'max':
3} %}
</div>
Is that possible in symfony2? If not..
should I create another action for my bundle with the same code inside
of loginAction?
or
should I modify the original loginAction code and write control
structures?
if(currentPage == 'home')
renderResponse('template1')
else
renderResponse('template2')