Question

I have installed Barrio Bootstrap (8.x-4.33) and it worked so far. But I can't override a template for a specific node type. I copied the original template into my subtheme/template folder and named it like suggested in the FILE NAME SUGGESTION (debug mode). E.g.: bs-2col-bricked--node-cuba-casa-particular-full.html.twig

This doesn't work.

Only when I name it like the original file bs-2col-bricked.html.twig it works.

I tried also 5.1.4, but it's the same. Anything wrong with the FILE NAME SUGGESTIONS?

In my Bootstrap3 theme it worked.

Can anybody help, please.

Was it helpful?

Solution

My solution was to turn off the layout ('Manage display' --> 'Select a layout' --> 'none'). Now the debug mode FILE NAME SUGGESTIONS showed the correct suggestions. I was able to override the 'node.html.twig' in my subtheme (in my case with 'node--CONTENT-TYPE--full.html.twig')from 'themes/bootstrap_barrio/templates/content/'.

Neither the FILE NAME SUGGESTIONS for the DS (8.x-3.9) nor the Bootstrap Layouts (8.x-5.2) were working (the one you see in debug mode, when one of those layouts is selected in 'Manage display').

Maybe there is a better way ...

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top