I created a custom theme that has the bootstrap_barrio
contrib theme as base theme
. Everything is setup and working except that my custom region--content.html.twig
in the /templates folder of my custom theme isn't being picked up. Drupal continues to use the base region--nowrap.html.twig
that came with bootstrap_barrio. My custom template shows up in the list of template suggestions when twig debugging is on.
I thought all I needed to do to override a base template was create a custom template into the custom theme, rebuild cache and Drupal will pick it up, as long as it conforms to the theme hook suggestions naming convention.
Twig Debugging Output:
<!-- THEME DEBUG -->
<!-- THEME HOOK: 'region' -->
<!-- FILE NAME SUGGESTIONS:
x region--nowrap.html.twig
* region--content.html.twig
* region.html.twig
-->
<!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/layout/region--nowrap.html.twig' -->
region--nowrap.html.twig
frombootstrap_barrio
into your theme, modify it with a "I AM HERE" text or something, rebuild caches, and see if Drupal picks it up.region--nowrap.html.twig
into custom theme, Drupal does pick it up. It just doesn't do the same forregion--content.html.twig