Theme hook template path overriden if template matches existing theme hook

Created on 7 August 2024, 4 months ago

Problem/Motivation

I have a theme hook called ca_container which uses a twig template from outside of the theme called container.html.twig (our approach has been to put templates alongside their component in our design system). However, at render time, the theme registry swaps out my custom path with the path to stable9's container.html.twig.

Here's what my theme hook looks like (using Pinto so this gets autogenerated via various traits)

When debugging into ThemeManager::render, I can see that when it calls $info = $theme_registry->get($hook); it's returning the path to the stable9 template

I'm not sure if this is expected, or a bug. Obviously we can just change the template name and be happy but it'd be nice to have this working.

Steps to reproduce

See above.

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
Theme 

Last updated about 19 hours ago

Created by

🇦🇺Australia acbramley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024