# sw\_extends vs extends

**URL:** <https://forum.shopware.com/t/sw-extends-vs-extends/65206>\
**Category:** Themes & Design (EN)\
**Created:** [4. März 2020 um 09:39 UTC](https://forum.shopware.com/t/sw-extends-vs-extends/65206 "2020-03-04T09:39:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yafar\_iSi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/yafar_isi/32/10765_2.png) [@Yafar\_iSi](https://forum.shopware.com/u/Yafar_iSi)\
**Post date:** [4. März 2020 um 09:39 UTC](https://forum.shopware.com/t/sw-extends-vs-extends/65206/1 "2020-03-04T09:39:12Z")

</div>

Hi everyone!

I am trying to create my own template

I created MyTheme/src/Resources/views/storefront/base.html.twig (It works…)

I am trying to overwrite&nbsp;the product page  
MyTheme/src/Resources/views/storefront/page/product-detail/index.html.twig

But with {% sw\_extends ‘@MyTheme/storefront/base.html.twig’ %} in MyTheme/src/Resources/views/storefront/page/product-detail/index.html.twig file

I get {% sw\_extends ‘@Storefront/storefront/base.html.twig’ %}

but if I replace “sw\_extends” with “extends” it works…

Shouldn’t “sw\_extends” and “extends” have the same behavior?

---

<div class="post-metadata">

**Author:** ![timbrns](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/timbrns/32/19740_2.png) [@timbrns](https://forum.shopware.com/u/timbrns)\
**Post date:** [11. März 2020 um 07:06 UTC](https://forum.shopware.com/t/sw-extends-vs-extends/65206/2 "2020-03-11T07:06:14Z")

</div>

Hi,

for everyone reading this later:

[https://issues.shopware.com/issues/NEXT-7517](https://issues.shopware.com/issues/NEXT-7517)  
[https://github.com/shopware/platform/issues/614](https://github.com/shopware/platform/issues/614)

“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.”

Kind regards,  
Tim
