Wiem jak nadpisać bazową templatke wszystkich formularzy z bundla
Układ templatek
Kod
MyBundle
Resources
views
Default
menu.twig.html
base.html.twig
layout.html.twig
Resources
views
Default
menu.twig.html
base.html.twig
layout.html.twig
layout.html.twig
{% extends 'MyBundle::Base.html.twig' %} {% block content %} {% block fos_user_content %}{% endblock %} {% endblock %}
base.html.twig
<!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="pl"> <!--<![endif]--> <head> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width"/> <meta name="description" content="{% trans %}description{% endtrans %}"/> {% block css %} {% stylesheets '@MyBundle/Resources/css/*' output='public/css/style.css'%} <link href="{{ asset_url }}" type="text/css" rel="stylesheet"/> {% endstylesheets %} {% endblock %} </head> <body> <header class="row"> {% include 'MyBundle:Default:menu.html.twig' %} </header> <div class="row"> <div class="twelve columns" role="content"> {% block content %} {% endblock %} </div> </div> {% block footer %} <footer class="row"> <div class="twelve columns"> <hr/> <div class="row"> <div class="six columns"> </div> </div> </div> </footer> {% endblock %} </body> </html>
MyBundle:
<?php namespace MyBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class MyBundle extends Bundle { public function getParent() { return 'FOSUserBundle'; } }
W jaki sposób mogę dodać do templatki menu (aktualnie pusta) w pełni funkcjonalny formularz do logowania?