@@ -39,3 +39,5 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
###> symfony/mailer ###
# MAILER_DSN=null://null
###< symfony/mailer ###
+
+TITLE="Opinion sur le réel"
@@ -1,5 +1,7 @@
twig:
file_name_pattern: '*.twig'
+ globals:
+ site_title: '%title%'
when@test:
@@ -5,6 +5,7 @@
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
parameters:
images_directory: '%kernel.project_dir%/public/uploads/images'
+ title: '%env(TITLE)%'
services:
# default configuration for services in *this* file
_defaults:
@@ -1,6 +1,6 @@
<header id="header">
<nav class="navbar" data-controller="menuburger">
- <a href="{{ path('app_index') }}" class="logo">Opinion sur le réel</a>
+ <a href="{{ path('app_index') }}" class="logo">{{ site_title }}</a>
<div class="nav-links" data-menuburger-target="navlinks">
<ul>
<li><a href="{{ path('app_index') }}">Blog</a></li>
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <title>{% block title %}Welcome!{% endblock %}</title>
+ <title>{% block title %}{{ site_title }}{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
{% block stylesheets %}
{% endblock %}
{% extends 'base.html.twig' %}
-{% block title %}Opinion sur le réel{% endblock %}
+{% block title %}{{ parent() }} - Blog{% endblock %}
{% block body %}
-{% block title %}Page contact{% endblock %}
+{% block title %}{{ parent() }} - {{ page.title }}{% endblock %}
-{% block title %}{{article.title}}{% endblock %}
+{% block title %}{{ parent() }} - {{article.title}}{% endblock %}
<a href="{{ path('app_index')}}">Retour au blog</a>