Tag: twig templating

  • Symfony 5+ Twig templates don’t forget to call the parent

    Symfony 5+ Twig templates don’t forget to call the parent

    Twig templates use inheritance and allows you to create named sections like this. <!doctype html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1, shrink-to-fit=no”> <link rel=’icon’ href=”{{ asset(‘images/favicon.ico’) }}” type=’image/x-icon’ > {% block head_extra %}{% endblock %} <title>{% block title %}{{ title }}{% endblock %}</title> {% block stylesheets %} {# ‘app’ must match the […]