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.
I would like to override the default content type template with my custom template. I was able to do this by copying "core\themes\bartic\templates\node.html.twig" to "core\themes\bartic\templates\node--content_type.html.twig" and adding custom template.
But I would like to accomplish this from inside my custom module without touching the theme. Is this possible? Thanks in advance for suggestions.
Comments
Comment #2
cilefen CreditAttribution: cilefen commentedComment #7
kmaniYou can add your own template file with help the following HOOK in your custom module.
Comment #8
cilefen CreditAttribution: cilefen commented