Skip to content
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

How to correctly override templates from UiBundle? #126

Open
zpi12lmm opened this issue Sep 13, 2022 · 2 comments
Open

How to correctly override templates from UiBundle? #126

zpi12lmm opened this issue Sep 13, 2022 · 2 comments

Comments

@zpi12lmm
Copy link

I have created my own custom theme (eg CrimsonTheme) with a third party css-framework and I need to override the templates from the UiBundle (eg Grid); I could put my templates in this location themes/CrimsonTheme/templates/bundles/SyliusUiBundle as stated in the documentation, but this bundle is shared by the default theme for both the shop and the admin UI, so I need a different approach where my new shared templates will only be available for my custom themes, how can I organize this?

@maxperei
Copy link

maxperei commented May 1, 2024

@zpi12lmm, this should be overridden in %kernel.project_dir%/templates/bundles/SyliusUiBundle/... not under the themes directory..

@zpi12lmm
Copy link
Author

zpi12lmm commented May 1, 2024

@zpi12lmm, this should be overridden in %kernel.project_dir%/templates/bundles/SyliusUiBundle/... not under the themes directory..

In this case, this will override the templates for both SyliusAdminBundle and SyliusShopBundle because they both use templates from SyliusUiBundle, meaning they are shared.

Here's a great example of how to fix this in case anyone else runs into this problem: https://github.com/royalphp/sylius-bootstrap-theme/blob/main/docs/installation_overrides.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants