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