0

In Magento 2, it is possible to extend themes by inheritance.

Is it possible to have more than 1 parent theme?

2
  • You can use one theme as your parent theme. and then on your parent theme add another parent theme
    – Asish Hira
    Apr 7, 2016 at 14:30
  • Thanks @AsishHira , but that will couple these 2 themes (one of them will have the other as a parent). Which is just what I'm trying to avoid :)
    – Michael
    Apr 7, 2016 at 14:34

1 Answer 1

2

No, you can't have multiple parents. That would make inheritance very messy. If both parents had the same template, which would take precedence?

As Asish said, all you can do is make use of multiple-level inheritance. Theme A can't extend Theme B and Theme C simultaneously, but Theme A can extend Theme B which extends Theme C.

Works:

Theme A > Theme B > Theme C

Does not work:

Theme A > Theme B +
Theme A > Theme C

1
  • Worth also adding you can have infinite theme fallback with Magento 1. Apr 7, 2016 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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