cancel
Showing results for 
Search instead for 
Did you mean: 

Themes in Magento 2.2 that extend off of each other?

Themes in Magento 2.2 that extend off of each other?

I've created a theme at: 

app/design/frontend/<vendor>/default

That I call my "default" theme with some base styles, that inherit from Magento Blank as it's parent. 

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Default</title>
    <parent>Magento/blank</parent>
    <media>
        <preview_image>media/preview.jpg</preview_image>
    </media>
</theme>

In the default theme, I'm using:

app/design/frontend/<vendor>/default/web/css/source/_extend.less

An _extend.less file to extend from the parent Magento Blank theme.

Now, I also have 2 different stores in Magento, so building off of the default theme, I have:

app/design/frontend/<vendor>/shop1

app/design/frontend/<vendor>/shop2

And I'm seeing that if I put in an `_extend.less` into

app/design/frontend/<vendor>/shop1/web/css/source/_extend.less

That doesn't appear to be working. The shop1 theme is using default as it's parent, and is correctly inheriting the styles of default. However, shop1 is not being extended by any customizations that I'm placing into it's _extend.less file. Am I doing something wrong here?

 

Thank you.

1 REPLY 1

Re: Themes in Magento 2.2 that extend off of each other?

Hi @aregowe

 

Have you set in backend default, shop1 or shop2 theme ?

 

If you set default then you should change in

app/design/frontend/<vendor>/default/web/css/source/_extend.less

 

If you set shop1 then you should change in

app/design/frontend/<vendor>/shop1/web/css/source/_extend.less

 

If you set shop2 then you should change in

app/design/frontend/<vendor>/shop2/web/css/source/_extend.less

 

If Issue Solved, Click Kudos/Accept As solutions.