ShopwareNoobyShopwareNooby MemberComments: 9 Received thanks: 0 Member since: January 10

Hi everybody,

i want to create a new cms Block Category. Therefor i want to extend the sw-cms-sidbar.html.tiwg ( Path: vendor/shopware/platform/src/Administration/Resources/app/administration/src/module/sw-cms/component/sw-cms-sidebar/sw-cms-sidebar.html.twig). I include the whole path in the {% sw_extends%} Tag but it doesnt work. 

I would be very grateful if somebody could help me.

Best regards

Vanessa :)

Answers

  • Yafar_iSiYafar_iSi MemberComments: 15 Received thanks: 1 edited April 1 Member since: June 2019

    There is a bug or weird behavior with {% sw_extends%} and with {% sw_include%}

    Try {% extends %} {% include %}`

    https://github.com/shopware/platform/issues/614

    TLDR: 

    Currently the sw_extends looks for the next inheritance chain entry which is queued after your "MyTheme". However, this algorithm does not seem to consider if the extends is not the same template as the loaded file.

    So at the moment it is right that you have to work with extends. I have imported the ticket and we will take a closer look at the error.

    Just to make sure use the Symfony profiler to see which file is been loaded

    image

     

    image

    If your file is loading from `@Storefront`, that's the issue

    Thanked by 1ShopwareNooby
Sign In or Register to comment.