The file extension represents the format of the template file, not the
format of the data that will be output after processing. It's very
relevant to how an editor interprets the template file (language
grammar/syntax highlighting, etc.) and it's unrealistic to expect
users to have to tweak their editors or IDEs to suit.

As it's easy to change the naming as far as Symfony is concerned, I
think this is the logical approach and will cause less aggravation to
the users.

So, +1 for having the intended output format (html, json, xml, csv,
etc.) as the second part of the filename and the actual file format
(php, twig, etc.) as the file extension: index.html.php/
index.json.php, index.html.twig/index.json.twig, etc.

On Jan 20, 10:53 am, Fabien Potencier <fabien.potenc...@symfony-
project.com> wrote:
> On 1/20/11 4:40 PM, Andy Stanberry wrote:
>
> > The bulk of the content might be html, but until the twig tags are
> > rendered it's not an html file. You can't drop it into a web browser and
> > look at it. If I paste a bunch of html into a word document or take a
> > screenshot of html, should the extension be html?
>
> We can have this debate for ages. The fact is that the file contains
> HTML and Twig, or JS and PHP. And as we can have only one extension, we
> need to make a choice. And the choice should probably be based on how
> IDEs behave.
>
> Fabien
>
>
>
> > On Thu, Jan 20, 2011 at 9:59 AM, Fabien Potencier
> > <[email protected]
> > <mailto:[email protected]>> wrote:
>
> >     It depends how you see your templates. For me, an HTML template is
> >     about a lot of HTML a a few Twig tags. So, the "main" format is
> >     definitely HTML.
>
> >     Fabien
>
> >         Wouldnt you be surprised to see content of html if you openen a .xls
> >         file? or a image file of any type. You know because it is named
> >         .jpg it
> >         will be an image if it wasnt we would have no idea whatsoever to
> >         know
> >         what the different files contain.
>
> >         --
> >         If you want to report a vulnerability issue on symfony, please
> >         send it
> >         to security at symfony-project.com <http://symfony-project.com>
>
> >         You received this message because you are subscribed to the Google
> >         Groups "symfony developers" group.
> >         To post to this group, send email to
> >         [email protected] <mailto:[email protected]>
> >         To unsubscribe from this group, send email to
> >         [email protected]
> >         <mailto:symfony-devs%[email protected]>
> >         For more options, visit this group at
> >        http://groups.google.com/group/symfony-devs?hl=en
>
> >     --
> >     If you want to report a vulnerability issue on symfony, please send
> >     it to security at symfony-project.com <http://symfony-project.com>
>
> >     You received this message because you are subscribed to the Google
> >     Groups "symfony developers" group.
> >     To post to this group, send email to [email protected]
> >     <mailto:[email protected]>
> >     To unsubscribe from this group, send email to
> >     [email protected]
> >     <mailto:symfony-devs%[email protected]>
> >     For more options, visit this group at
> >    http://groups.google.com/group/symfony-devs?hl=en
>
> > --
> > Πίστις, ἐλπίς, ἀγάπη
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it
> > to security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-devs?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to