I seem to be having problems with twig render nesting
To explain further I have the following view layout structure
resources
.. config
.. public
.. etc
.. views
.. WeekBreakDown
.. Export
.. export.html.twig
.. other.html.twig
.. index.html.twig
.. other.html.twig
Now I can render the following without error
$this->render('NameBundle:WeekBreakDown:index.html.twig');
or
$this->render('NameBundle:WeekBreakDown:other.html.twig');
What I am having trouble with is rendering the Export path.
I have tried
$this->render('NameBundle:WeekBreakDown:Export:index.html.twig');
and also..
$this->render('NameBundle:WeekBreakDown:Export\index.html.twig');
I get the InvalidArgumentException: Unable to find template
This should work
$this->render('NameBundle:WeekBreakDown/Export:index.html.twig');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With