Closed mkruk-u2 closed 6 years ago
Hi @mkruk-u2, I'm in the same situation as you with Symfony 4!
The problem is they use the class TemplateReference
to call the template file. With this code it seems we cannot override the templates files.
So to fix this issue, we need to replace the code like:
->setTemplate(new TemplateReference('FOSCommentBundle', 'Thread', 'comments'));
by
->setTemplate('@FOSComment/Thread/comments.html.twig');
I will change the code, test it and do a PullRequest as soon as possible.
Should be fixed in https://github.com/FriendsOfSymfony/FOSCommentBundle/pull/651
We're updating our project to use Symfony 4 and we're trying to move our templates to
templates/
directory. Since we override some of FOSCommentBundle templates we would like to move them undertemplates/bundles/FOSCommentBundle/
(as suggested here) but this doesn't seem to work - our customized templates are not loaded and default bundle templates are still used.How can we override templates using
templates/
directory?Our current setup: