In Smarty you can do
{$var = 'bla' scope=parent}
Is it possible in Twig?
Don't suggest to use blocks. I know. I need variable.
In Smarty you can do
{$var = 'bla' scope=parent}
Is it possible in Twig?
Don't suggest to use blocks. I know. I need variable.
base.twig
child.twig
One other approach is to see twig configuration globally in your application. For example in Silex:
You can then access that variable in all templates: