We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a route mapped to a template name
shop_domaines_show: path: /domaines/{slug} defaults: _controller: black_sylius_marketplace.controller.seller:showAction _sylius: template: 'Shop/views/domaines/show.html.twig' repository: method: findOneBySlug arguments: - $slug
And a template in templates/Shop/views/domaines/show.html.twig
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
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 :
templates
Unable to find template "Shop/views/domaines/show.html.twig" (looked into: /project/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views, /project/templates, /project/templates, /project/vendor/symfony/twig-bridge/Resources/views/Form).
The loader is not looking in the theme directory. Note it seems to be looking twice in the /project/templates dir.
/project/templates
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)
/theme/MyTheme/SyliusShopBundle/views/Homepage/index.html.twig
The theme is enabled of course
I'm using Sylius 1.8 and sylius/theme-bundle 1.5.1
The text was updated successfully, but these errors were encountered:
A temporary fix is to add the theme directory to twig paths but it is not a solution
in config/packages/twig.yaml
config/packages/twig.yaml
twig: # DO NOT COMMIT THIS! paths: ['%kernel.project_dir%/themes/MyTheme', '%kernel.project_dir%/templates']
Sorry, something went wrong.
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: