6
votes

Replacement of the template of the FOS does not work well. Cause I'm having problems you do not know. It can be seen better, please tell me.

MyBundle.php

class MyBundle extends Bundle {

    public function getParent() {
        return 'FOSUserBundle';
    } 
}

MyBundle\Resources\FOSUserBundle\views\Security\login.html.twig

{% extends "FOSUserBundle::layout.html.twig" %}

{% block fos_user_content %}
{% if error %}
    <div>{{ error|trans({}, 'FOSUserBundle') }}</div>
{% endif %}

{% block title %}Demo Login{% endblock %}

{% block content %}
    {% block fos_user_content %}{% endblock %}
{% endblock %}


{% endblock fos_user_content %}

vendor \ friendsofsymfony \ user-bundle \ FOS \ UserBundle contents of the \ Resources \ views \ Security of login.html.twig are displayed.

1

1 Answers

9
votes

Put your file in app directory

app\Resources\FOSUserBundle\views\Security\login.html.twig

And clear cache.