I have installed Bootstrap and the Radix theme, and created a sub-theme, which is all working OK. But I am unable to get some of my twig files to override the base theme twig files...
The file themes/custom/mytheme/templates/page/page.html.twig contains: {% embed '@radix/navbar/navbar.twig' with {
I would like to create a navbar.twig in my subtheme and use that instead of the standard radix one. Changes I make to themes/contrib/radix/src/components/navbar/navbar.twig will show up on my site (as this is what the embed refers to), but changes to themes/custom/mytheme/src/components/navbar/navbar.twig do not.
How can I change that embed line so that it includes the subtheme twig rather than the base? It's some kind of twig namespace? I have not been able to figure out where it is defined.
page.html.twig
instead and use{% embed '@my_subtheme/navbar/... %}
in there.@radix
is a namespace. Drupal provides a Twig@namespace
for every theme and every module.johndoe
, use@johndoe
. Only lowercase, digits and underlines are allowed for machine names. The Twig file must be placed below thetemplates
subdir, but do not includetemplates/
in the embed string