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

Extend this block: Support for Admin Components #57

Open
amenk opened this issue May 24, 2022 · 4 comments
Open

Extend this block: Support for Admin Components #57

amenk opened this issue May 24, 2022 · 4 comments

Comments

@amenk
Copy link
Contributor

amenk commented May 24, 2022

I tried extending a block vendor/shopware/administration/Resources/app/administration/src/app/component/structure/sw-search-bar/sw-search-bar.html.twig

Extends this block in other template directory

I get an error message:

Cannot determine view folder of currently opened file

There seems to be something special about that file as it is actually not in the view folder?

v0.0.25

@shyim
Copy link
Collaborator

shyim commented May 24, 2022

It works currently only in Storefront as Administration doesn't have such fixed folder structure

@iMiMWeis
Copy link

It also seems to be broken for 3rd party plugins.

vendor/store.shopware.com/moorlmerchantfinder/src/Resources/views/plugin/moorl-merchant-finder/component/result-item-static-main.html.twig

@shyim
Copy link
Collaborator

shyim commented May 27, 2022

@iMiMWeis Your issue is fixed with c8ca748

@shyim shyim changed the title Extend this block: Cannot determine the view folder (admin, from vendor) Extend this block: Support for Admin Components May 27, 2022
@shyim
Copy link
Collaborator

shyim commented Jul 9, 2022

So its a big step forward as we can create components on the fly. So when extending a block, and we don't find a component, we can just create it.

Missing now:

  • Index components as Component.override in second index, to make it easier accessible
  • Add a template to a component if it's missing. The state is indexed with 678df62
  • We can finally add the logic to override a block 😂

shyim added a commit that referenced this issue Jul 10, 2022
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

3 participants