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.
Problem/Motivation
While working with Drupal 8 I experienced, that the twig file, does not follow the Twig naming conventions we have in D8. You can find a summary at Template naming conventions. We should change it before more and more people start to adopt D8 and the Leaflet module.
Proposed resolution
Use a dash instead of underscore for the file template and change the hook_theme()
implementation.
leaflet_map.html.twig
-> leaflet-map.html.twig
Comment | File | Size | Author |
---|---|---|---|
#2 | leaflet-change_template_name-2699007-2.patch | 1.84 KB | szeidler |
Comments
Comment #2
szeidler CreditAttribution: szeidler at Ramsalt Lab commentedThe attached patch is changing the name and theme implementation.
Comment #4
pvhee CreditAttribution: pvhee at Marzee commentedMakes sense, thanks for the patch.