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.
API page: https://api.drupal.org/api/drupal/core!modules!node!templates!node.html....
Enter a descriptive title (above) relating to node.html.twig, then describe the problem you have found:
Node Template: node--type-[type] is not working
ex: node--type-article.html.twig
Template naming: node--article.html.twig is working fine.
ex: node--article.html.twig
Please make the changes on the node.html.twig page.
Issue fork drupal-2839804
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 2839804-node-template-example changes, plain diff MR !777 / changes, plain diff MR !775
- 2839804-wrong-node-type changes, plain diff MR !774
Comments
Comment #9
pameeela CreditAttribution: pameeela commentedComment #10
pameeela CreditAttribution: pameeela commentedComment #14
pameeela CreditAttribution: pameeela commentedFirst time working with MRs, took a few tries but I think I got there...
Comment #15
pameeela CreditAttribution: pameeela commentedWhoops, there are a bunch of instances of this, need to update all of them.
Comment #18
pameeela CreditAttribution: pameeela commentedComment #19
larowlanI think it is referring to the class added not the file name?
Comment #20
pameeela CreditAttribution: pameeela commented@larowlan pointed out that the docs are referring to the class names, not the template file names. The class names are correct as
node--type-[type]
.