diff --git a/.env-prod b/.env-prod index 89ae291..c85e31b 100644 --- a/.env-prod +++ b/.env-prod @@ -1,5 +1,8 @@ APP_ENV=prod APP_SECRET=ba16d9b24f329be32408d0a9dc24a534 #Nothing. We're an open book and have no secrets +#Message of the Day +#If blank, no MOTD will be displayed on pages. +MOTD="" #Ticket Database file URIs. RP_DATABASE_URL=sqlite:///%kernel.project_dir%/RPCopy/CRParchive.db SP_DATABASE_URL=sqlite:///%kernel.project_dir%/RPCopy/CSParchive.db 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