Skip to content

Latest commit

 

History

History
60 lines (51 loc) · 1.16 KB

theme_inheritance.md

File metadata and controls

60 lines (51 loc) · 1.16 KB

Theme inheritance

While you can't set two themes active at once, you can make use of multiple inheritance. Eg.:

{
    "name": "vendor/child-theme",
    "extra": {
        "sylius-theme": {
            "title": "Child theme",
            "parents": ["vendor/first-parent-theme", "vendor/second-parent-theme"]
        }
    }
}
{
    "name": "vendor/first-parent-theme",
    "extra": {
        "sylius-theme": {
            "title": "First parent theme",
            "parents": ["vendor/grand-parent-theme"]
        }
    }
}
{
    "name": "vendor/grand-parent-theme",
    "extra": {
        "sylius-theme": {
            "title": "Grandparent theme"
        }
    }
}
{
    "name": "vendor/second-parent-theme",
    "extra": {
        "sylius-theme": {
            "title": "Second parent theme",
        }
    }
}

Configuration showed below will result in given order:

  • Child theme
  • First parent theme
  • Grandparent theme
  • Second parent theme

Grandparent theme gets overrided by first parent theme. First parent theme and second parent theme get overrided by child theme.

Go back to the documentation's index