2

I have created two themes first is parent and second is a child to change the design of product page.

I want to set different layout for some product layout so I have created the child themes. A child theme inherits from its parent theme.

I have to override the layout in a child it is taking on parent layout it is not taking the child theme layout.

Please give an idea if anyone gets this.

Following is the theme.xml

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

And i want to change the catalog_category_view.xml layout for child theme. All the templates files are overwriting but layout file are not working.

  • maybe share some more information, e.g. files – juhanix Nov 21 '17 at 8:46
  • Updating the question – Nandkishor Sharma Nov 21 '17 at 8:54
0

You need to set <parent> tag as <parent>Magento/blank</parent> Now your theme.xml is looking like below,

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

You have set parent as Magento/Parent and There are not any theme related Magento/Parent by default.

Run command,

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy

php bin/magento cache:flush

  • I have already try but not getting solutions. – Nandkishor Sharma Nov 21 '17 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.