You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i've created a plugin, which need to extend the web storefront via twig.
Most of the templates work but for example those don't:
{% sw_extends '@Storefront/component/product/card/box-standard.html.twig' %}
{% sw_extends '@Storefront/element/cms-element-image.html.twig' %}
I thought it's the dash in the name, but following works:
{% sw_extends '@Storefront/layout/header/search-suggest.html.twig' %}
And I thought it's the include by {% sw_include .. %}, but following works:
(inlucde in aside-item.twig)
{% sw_extends '@Storefront/page/checkout/_item/product-aside.html.twig' %}
I tried to debug the process but didn't found anything which helps me to extend the template correct.
More Information:
Views path: custom/plugins/pluginName/src/Resources/views
sw_include does not work with non-constant strings. It ignores sw_extends chain if if the template is computed. For example, that happens with {% sw_include "@Storefront/component/product/card/box-" ~ layout ~ ".html.twig" %} and {% sw_include "@Storefront/element/cms-element-" ~ element.type ~ ".html.twig" ignore missing %}.
Hi,
i've created a plugin, which need to extend the web storefront via twig.
Most of the templates work but for example those don't:
{% sw_extends '@Storefront/component/product/card/box-standard.html.twig' %}
{% sw_extends '@Storefront/element/cms-element-image.html.twig' %}
I thought it's the dash in the name, but following works:
{% sw_extends '@Storefront/layout/header/search-suggest.html.twig' %}
And I thought it's the include by {% sw_include .. %}, but following works:
(inlucde in aside-item.twig)
{% sw_extends '@Storefront/page/checkout/_item/product-aside.html.twig' %}
I tried to debug the process but didn't found anything which helps me to extend the template correct.
More Information:
Views path: custom/plugins/pluginName/src/Resources/views
Not working template paths:
Cheers.
The text was updated successfully, but these errors were encountered: