I'm using a file serving as a form layout to overwrite certain elements (form_start, form_row, etc.). I register it like:
twig:
- AcmeMainBundle:Form:formlayout.html.twig
Is there a way to use in it my variables provided along with a form?
For example, when I send to index.html.twig
array ('form' => $formView, 'var' => $var);
Var is defined only in index.html.twig.
So how to make var defined in formlayout.html.twig
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…