Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>According to the FOSUserBundle documentation:</p> <blockquote> <p>The easiest way to override a bundle's template is to simply place a new one in your <em>app/Resources</em> folder. To override the layout template located at <em>Resources/views/layout.html.twig</em> in the FOSUserBundle directory, you would place you new layout template at <em>app/Resources/FOSUserBundle/views/layout.html.twig</em>.</p> <p>As you can see the pattern for overriding templates in this way is to create a folder with the name of the bundle class in the <em>app/Resources</em> directory. Then add your new template to this folder, preserving the directory structure from the original bundle.</p> </blockquote> <p>In my project I override FOSUserBundle's layout as they said and it's work like a charm. </p> <p>So doing it at the same way you will need to create <code>app/Resources/FOSUserBundle/views/Registration/register.html.twig</code>. (or the form you want to override)</p> <p><strong>EDIT</strong></p> <p>Ok, I just realize that you've chosen to extend the FOSUserBundle. In that case instead of <code>app/Resources/</code> you need to do it inside your bundle. But you don't need to put</p> <pre><code>{% extends 'FOSUserBundle::form.html.twig' %} </code></pre> <p>The FOSUserBundle will detect that you are overriding the bundle and will be extended automatically.</p> <p>And you also need to tell your bundle that FOSUserBundle is its parent.</p> <pre><code>class YourBundle extends Bundle { public function getParent() { return 'FOSUserBundle'; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload