TwigJS in the administration

Hi,

The existence of NEXT-22760 indicates that the usage of TwigJS will be phased out.

Does that mean, that overriding and extending Components will no longer be supported?

We’re currently trying to upgrade an plugin to work with Shopware 6.6 and are no longer able to extend the order creation view because sw-order-create-general’s template doesn’t contain any twig blocksIf there’s a new way to achieve this it’s not part of the documentation.

Conversation from the Community Slack in case somebody finds this:

Overriding and extending components is and will still be supported. So you don’t need to worry about this (I can also spoiler that we also developing solutions for the new composition API, etc. so that you can still overwrite these components)But we will reduce the places where Twig blocks are available in specific cases to improve the internal development speed or where hard breaks in the future are necessary. The mentioned issue is for giving awareness to internal developer so that they think twice about adding new blocks.If you need specific blocks at specific places feel free to create a PR with the blocks and when we also agree with it we will merge them

Hi, thanks for the response. I’m glad to hear that the support will remain.
Does that mean that a deliberate decision was made to disable overriding the view I mentioned altogether?
I believe with how twig works, you need at least one block in order to allow extending the template. This makes me think that every component should at least have one all encompassing block. Otherwise overriding/extending it is pointless.

In most cases the team has a specific purpose why they removed it. But I don’t know the exact reason here.Correct. If you want to override the template you need to have atleast one block. If there is no block then it is not possible to override it. But not every component needs a encompassing block to work. Without a block the normal template will be rendered but no override is possible. Only components which should be overridden need blocks.Overriding these components could be useful if you just want to add something to the script part of the component, e.g. adding something to the Criteria

Dieses Thema wurde automatisch 30 Tage nach der letzten Antwort geschlossen. Es sind keine neuen Antworten mehr erlaubt.