Yafar_iSiYafar_iSi MemberComments: 6 Received thanks: 0 Member since: June 17 edited September 17

Hi

Some namespace in TWIG is not accessible from everywhere

Example:

{% 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 ModeratorComments: 1073 Received thanks: 300 Member since: June 2014

    Hi,

    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

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