- Issue created by @Nicolas S.
- Status changed to Needs review
7 months ago 8:24am 24 April 2024 - π«π·France Nicolas S. Lyon, France
We have an antoher with hook_theme
bundle.html.twig not working because bundle is not defined in subentity hook_theme
When I try in my custom module, I don't have all suggestion
/** * Implements hook_theme(). */ function MY_MODULE_theme() { return [ 'bundle' => [ 'render element' => 'elements', 'base hook' => 'subentity', ], ]; }
- Assigned to anfor
- Issue was unassigned.
I can reproduce but i'm able to use the good TWIG template by using this :
subentity--<subentity-machine-name>.html.twig
If i have a specific display mode, i can also use :subentity--<subentity-machine-name>--<display-mode-machine-name>.html.twig
Example :
- if my subentity id is "tab_homepage", i can usesubentity--tab-homepage.html.twig
- if my subentity id is "tab_homepage" and use the display mode id "header_top", i can usesubentity--tab-homepage--header-top.html.twig
Maybe it can help waiting for a patch.
- π«π·France Ilyna
;We need also alert of the templates suggestions change.
- Status changed to Needs work
6 months ago 1:32pm 7 June 2024 - π«π·France Ilyna
This patch replace the prΓ©vious. But I found that is not suffisent.This patch replaces the previous one. However, there is still an issue with patch #4: while we do get the suggestions, the template is not being applied. Needs work.