Open armellarcier opened 3 years ago
A temporary fix is to add the theme directory to twig paths but it is not a solution
in config/packages/twig.yaml
twig:
# DO NOT COMMIT THIS!
paths: ['%kernel.project_dir%/themes/MyTheme', '%kernel.project_dir%/templates']
I have a route mapped to a template name
And a template in
templates/Shop/views/domaines/show.html.twig
It works ok.
When I want to override this template in the theme it fails.
I put a new file in
themes/MyTheme/Shop/views/domaines/show.html.twig
And it's not loaded.
If I remove the template in the
templates
dir, leaving only the one in the theme, here is the error I get :The loader is not looking in the theme directory. Note it seems to be looking twice in the
/project/templates
dir.The problem only occurs for app templates.
Bundle templates are loaded fine from the theme directory. (
/theme/MyTheme/SyliusShopBundle/views/Homepage/index.html.twig
works perfetcly)The theme is enabled of course
I'm using Sylius 1.8 and sylius/theme-bundle 1.5.1