Yafar_iSiYafar_iSi MemberComments: 20 Received thanks: 4 Member since: June 2019 edited September 2019


Some namespace in TWIG is not accessible from everywhere


{% include "@Storefront/components/atoms/icon/icon.twig" %}

Does not find icon.twig, but 

{% sw_include "@Storefront/components/atoms/icon/icon.twig" %}

It does finds it.


I understand that TWIG does not allow multi inheritance out of the box and that we should use sw_include.

But this brings the next problem

{{ block("logo", "@Storefront/components/atoms/icon/icon.twig") }}

The Storefront name is not included then icon.twig is not found

Could Storefront call universally?

Thanks in advance!

1 Answer

  • Michael TelgmannMichael Telgmann AdministratorsComments: 1405 Received thanks: 398 Member since: June 2014


    I think, that we currently do not support the block() function of Twig, because of the reasons your already said. I created at ticket for that https://issues.shopware.com/issues/NEXT-4950
    Maybe we could fix that

    Best regards from Schöppingen

    cool Michael Telgmann

    Accepted Answer
  • Accepted Answer
Sign In or Register to comment.