Is it possible (atm) to override or better extend an existing element via plugin?

I want to override or extend the element “image” ("…administration/src/module/sw-cms/elements/image"). Is it possible at the moment? First I want to extend or override the …/config/sw-cms-el-config-image.html.twig template, so I created the file in my plugin (MyPlugin/src/Resources/app/administration/src/module/sw-cms/elements/image/config/), but with no effect.

{% block sw_cms_element_image_config %}
    test...
{% endblock %}

 

Hello, I just had the same problem.
It’s possible to extend or overwrite an existing CMS elements config. Depends if your overwrite the config twig file or extend it with {% parent %}.

For your changes to be applied you also need to create an index.js in which you override the existing JS component… and after that rebuild the administration with following command.

./bin/build-administration.sh

yourPlugin/src/Resources/app/administration/src/module/sw-cms/elements/image/index.js

import template from './config/sw-cms-el-config-image.html.twig'
const { Component } = Shopware;

Component.override('sw-cms-el-config-image', {
    template
});

yourPlugin/src/Resources/app/administration/src/module/sw-cms/elements/image/config/sw-cms-el-config-image.html.twig

{% block sw_cms_element_image_config %}

    {% parent %}
    ...

{% endblock %}

Best regards
Reinhard