globals twig support and website

This commit is contained in:
Tykayn 2021-04-21 11:04:54 +02:00 committed by tykayn
parent edfb65c56e
commit 8bc01198b8
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,8 @@
twig:
default_path: '%kernel.project_dir%/templates'
globals:
BASE_URL: '%env(BASE_URL)%'
APP_ENV: '%env(APP_ENV)%'
WEBSITE_NAME: '%env(WEBSITE_NAME)%'
WEBSITE_LOGO: '%env(WEBSITE_LOGO)%'
APP_ENV: '%env(APP_ENV)%'
SUPPORT_EMAIL: '%env(SUPPORT_EMAIL)%'

View File

@ -29,7 +29,8 @@ class PollController extends AbstractController
}
return $this->render('poll/index.html.twig', [
'count' => count($polls),
'polls' => $titles,
'titles' => $titles,
'polls' => $polls,
]);
}