SwagBasicExampleTheme
.SwagBasicExampleTheme
. Checkout the Create a first theme guide if you don't know how to create a new theme. In this guide we call the extending theme SwagBasicExampleThemeExtend
. After SwagBasicExampleTheme
was installed, activated and assigned to a sales channel we need to set up the inheritance.theme.json
and it is located in the <plugin root>/src/Resources
folder.theme.json
file looks like this:views
, style
, script
and asset
contains the @Storefront
placeholder. This means that inheritance is already taking place here. Every theme inherits the default theme of Shopware called @Storefront
.SwagBasicExampleTheme
. We just need to add it in the inheritance chain.views
sectionviews
section we added the placeholder @SwagBasicExampleTheme
right before our current theme. This means that when a view gets rendered, the storefront template is first used as the basis. The extensions of the installed plugins are applied to this. Next, the changes to the @SwagBasicExampleTheme
theme are taken into account in the rendering process. Finally, the changes to our current theme are applied.script
sectionscript
section. The javascript of the storefront serves as the basis. On top of this come the extensions of the theme @SwagBasicExampleTheme
. Finally, the JavaScript that we can implement in the current theme is applied.style
sectionstyle
section behaves similarly to the others. The only difference here is the override.css
can affect SCSS variables e.g. $border-radius
. That's why it's at the top of the list. To find out more about overriding variables check out the Override Bootstrap variables in a theme guide.asset
section@SwagBasicExampleTheme
you have add it to the list here as well.configInheritance
sectionconfigInheritance
section will use the field configuration from the given themes and defines the last of the themes, that is different from the current theme, as the parent theme. The configuration values are inherited from the themes mentioned in configInheritance
. The Storefront theme configuration will always be inherited, even if no configInheritance
is given. See Theme inheritance configuration for a more detailed example.