-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
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
Overriding bundle templates via Twig namespaces is not possible #8929
Comments
By the looks of it, since this @pamil Can you shed some more light on this? |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions. |
@pamil Any news on this? Can this be fixed for 1.1? |
@emodric sorry to keep you waiting! At the time I've written ThemeBundle I think the paths were not handled like this, so it looks like a bug caused by Twig changes in the meantime. I'd love to spend some time on it, but I'm quite limited on this matter, so I'd really appreciate if you or someone else could help with this issue. I would be happy to answer all the questions, you can also catch me on Slack :) As for releases, we can fix it for both 1.0.x and 1.1.x branch. |
From my very limited investigation, I think that just removing If community has anything to add, I'll gladly listen :) |
For a possible workaround |
#9804 should fix this one. |
In Symfony, it is possible to override any bundle template by using Twig namespaces. Basically, you register an additional path for a namespace equal to the namespace of the bundle you wish to override.
However, it looks like that
Sylius\Bundle\ThemeBundle\Templating\TemplateNameParser
breaks this functionality as it assumes that for example@SyliusShop
Twig namespace always corresponds toSyliusShopBundle
bundle. In reality,@SyliusShop
namespace can match any file system path as defined bytwig.paths
config.The text was updated successfully, but these errors were encountered: