Template file name suggestions not working

Created on 6 August 2021, almost 3 years ago
Updated 27 February 2024, 4 months ago

I have a content type (called "Listing") for which I have selected the "Two column stacked" layout on the manage display page. I want to override the template and while I can copy the twig file from bootstrap_layouts/templates/3.0.0/bs-2col-stacked.html.twig into my theme/templates directory and that works and correctly overrides the default, if I try to rename the file to be more specific (i.e. I only want it for this particular content type), the template file name suggestions are not working.

I have twig debugging on and the full list of suggestions is:

<!-- FILE NAME SUGGESTIONS:
   * bs-2col-stacked--node--3.html.twig
   * bs-2col-stacked--node-listing-full.html.twig
   * bs-2col-stacked--node-listing.html.twig
   * bs-2col-stacked--node-full.html.twig
   * bs-2col-stacked--node.html.twig
   x bs-2col-stacked.html.twig
   x bs-2col-stacked.html.twig
-->

But once I add anything to the file name after the work "stacked", it does not work and just uses the default template from bootstrap_layouts.

If I use Display Suite layouts, I can get specific with the file names (e.g. ds-1col--node-listing.html.twig) so I'm not sure what is happening and why bootstrap layouts isn't following the template suggestions.

πŸ› Bug report
Status

Needs review

Version

5.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States emont88

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024