From b8f2dc6a56691115c0b62e529d6ec7646c6a7ca0 Mon Sep 17 00:00:00 2001 From: Audrey Jensen Date: Tue, 25 Jul 2023 21:34:20 +0000 Subject: [PATCH] implement MOTD below navbar --- config/packages/twig.yaml | 3 +++ templates/_header.html.twig | 1 - templates/_navbar.html.twig | 12 +++++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index f9f4cc5..ad88610 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -1,6 +1,9 @@ twig: default_path: '%kernel.project_dir%/templates' + globals: + motd: '%env(MOTD)%' when@test: twig: strict_variables: true + diff --git a/templates/_header.html.twig b/templates/_header.html.twig index 92af358..0bf57f3 100644 --- a/templates/_header.html.twig +++ b/templates/_header.html.twig @@ -17,6 +17,5 @@
- \ No newline at end of file diff --git a/templates/_navbar.html.twig b/templates/_navbar.html.twig index 2345103..80c555f 100644 --- a/templates/_navbar.html.twig +++ b/templates/_navbar.html.twig @@ -37,4 +37,14 @@ - \ No newline at end of file + + {# Display MOTD, if one is set #} + {% if motd is defined and motd is not empty %} + + {% endif %} \ No newline at end of file