php - Passing data to universal twig file Symfony2 -
i want send user data univeral header file, shown on every page can display "hi, {{ username }}" message.
how can without getting data in controllers of every page?
you can render data totally different controller , action (so 1 place) in twig template using:
{{ render(controller('appbundle:base:myaction')) }}
you can read on here: https://codedump.io/share/mq3hievaedpd
Comments
Post a Comment