Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By SylvainMac on
Hi,
I have a problem with theme inheritance and templates override.
I have a theme "ThA" with specific Twig templates. Templates are declared in hook function ThA_theme().
I create a new theme "ThB" herited from "ThA" (I have set "base theme: ThA" in the ThB.info.yml file). In templates directory of ThB, I rewrite some Twig files overriding ThA ones (same name, same location).
Twig files from ThB are not used. I must explicitaly create a hook function ThB_theme() and declare each Twig file.
Did I forget something in my statement?
Thanks in advance,
Sylvain