FOSUserBundle: Override resetting templates / Problem with route token
Hello,
Reference: #878 (is closed!?)
Problem is:
An exception has been thrown during the rendering of a template
("Some mandatory parameters are missing ("token") to generate
a URL for route "fos_user_resetting_reset".") in
FOSUserBundle:Resetting:reset.html.twig at line 4.
The templates be total normal … Information: I could override ALL templates except the one with the “token” parameter. And second information: I could override the templates “normal” without “extends” or “include” tags… Then everythink is okay. But if i use extends or include tag i get the error =.=
FOSUserBundle:Resetting:reset.html.twig
{% extends "FOSUserBundle::layout.html.twig" %}
{% block fos_user_content %}
{% include "FOSUserBundle:Resetting:reset_content.html.twig" %}
{% endblock fos_user_content %}
FOSUserBundle:Resetting:reset_content.html.twig
{% extends "FOSUserBundle::layout.html.twig" %}
{% block contentmain %}
<form action="{{ path('fos_user_resetting_reset', {'token': token|default('123abc')}) }}" {{ form_enctype(form) }} method="POST">
{{ form_widget(form) }}
<div>
<input type="submit" value="{{ 'resetting.reset.submit'|trans }}" />
</div>
</form>
{% endblock %}
FOSUserBundle::layout.html.twig
{% extends '::base.html.twig' %}
{% block contentmain %}
{% block fos_user_content %}{% endblock %}
{% endblock %}
Dont know why there is a problem with this… Only one parameter in route…
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 18 (2 by maintainers)
try This
@ibasaw you can overwrite the template. The only thing is that your overwritten template must generate the route properly (i.e. passing the mandatory parameters) instead of just generating the route name without parameters.
ok
so, how can i have the reset form in my website with my look and feel ?
How do you do guys to do this ?
Do i copy/paste the whole base html twig to get the same result and include the form in it ? (seem bad and dirty)