When I attempt to use amptheme (the base theme, not the subtheme) as the actual AMP theme for testing, the templates/layout/html.tpl.php and templates/layout/page.tpl.php are not being used properly. When I delete the ampsubtheme_example directory, everything works as expected!
This appears to be an issue with the fact that Drupal is discovering ampsubtheme_example/templates/layout/html.tpl.php *before* templates/layout/html.tpl.php, but doesn't respect that it's inside another theme, and not itself. Other themes like Omega have had to deal with this by placing each theme inside a root-level directory, instead of using subdirectories.
Worth investigating if this applies to Drupal 8 as well.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2717477-3-amp-theme-structure.patch | 58.91 KB | rainbowarray |
Comments
Comment #2
dave reidSeeing as drupal_find_theme_templates() still exists in 8.0.x - 8.2.x, I would wager D8 is affected by this too.
Comment #3
rainbowarrayHere is a patch that moves amptheme into a subdirectory in D8.
Comment #5
rainbowarrayFixing D7 next.
Comment #7
rainbowarrayAll fixed now. Thanks so much for tracking this down, Dave!