Skip to content

Theme suggestions overriding patterns with hyphens in their ID are not loaded #271

@gambry

Description

@gambry

With #243 we allowed hyphens as pattern id. Although this work perfectly, we haven't fully tested overriding patterns template through theme suggestions.

And indeed if there is a hyphen in the pattern id, overrides are not loaded.

In order to reproduce:

  1. Create a pattern with hyphens in is ID, i.e. this-is-a-test
  2. In your active theme try to override that pattern, creating pattern-this-is-a-test.html.twig template (of course different from content of pattern template!)
  3. Load the pattern in your website, i.e. visiting the Pattern Library section.
  4. Override is not loaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions