Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gambry opened this issue Sep 5, 2019 · 1 comment

Comments

@gambry
Copy link
Contributor

gambry commented Sep 5, 2019

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.
@gambry
Copy link
Contributor Author

gambry commented Sep 5, 2019

PR #270 addresses this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant