Is there a recommended file extension for Twig templates? I've seen the following used, and would like to be consistent with the majority of other developers.
- myTemplate.html.twig
- myTemplate.twig
- myTemplate.html
- myTemplate.tmpl
Is there a recommended file extension for Twig templates? I've seen the following used, and would like to be consistent with the majority of other developers.
Normally you define the format before the .twig
extension. So when you work with Symfony2 for example you can define the output format.
myTemplate.json.twig
for example. So normally you should use that format. But you don't need that.
Here is an issue but you can see how it works