+1 from me for the HelloBundle:Hello:index.xml.php type rendering.

Another idea could might be to introduce a default loading chain which
first looks for twig templates and then php templates

On Sep 25, 7:43 am, Fabien Potencier <fabien.potenc...@symfony-
project.com> wrote:
> On 9/24/10 11:56 PM, Richtermeister wrote:
>
> > Hey Kris,
>
> > without knowing anything about how SF2 and bundles etc work, but
> > wouldn't it make sense - in the situation you describe - to allow each
> > bundle to specify the template engine it uses? That way I can mix my
> > php coded application with a twig bundle, etc.
>
> It will rapidly become a configuration hell. And frankly, it's not too
> much work to add :php at the end of each template name.
>
> Here is another suggestion: what about removing the "default" templating
> engine. What about making the templating engine part of the template
> name mandatory. That way we are always explicit and there is no default
> per se (technically -- of course, the documentation part is different):
>
> HelloBundle:Hello:index:php
> HelloBundle:Hello:index:twig
>
> HelloBundle:Hello:index.xml:php
> HelloBundle:Hello:index.xml:twig
>
> We can probably find a better naming convention. What about this:
>
> HelloBundle:Hello:index.php
> HelloBundle:Hello:index.twig
>
> HelloBundle:Hello:index.xml.php
> HelloBundle:Hello:index.xml.twig
>
> That way, when you are using the filesystem loader (and this is the case
> 99% of the time), the last part is just the file name.
>
> What do you think?
>
> Fabien
>
>
>
>
>
>
>
> > Just a thought.
> > Daniel
>
> > On Sep 24, 11:40 am, Kris Wallsmith<kris.wallsm...@symfony-
> > project.com>  wrote:
> >> For example, if a third party controller asks Symfony2 to render 
> >> FooBundle:Bar:blah and has provided a blah.php template, expecting the 
> >> default engine to be PHP, that controller would break if you change the 
> >> default engine to Twig.
>
> >> --
>
> >> Kris Wallsmith | Release Manager
> >> kris.wallsm...@symfony-project.com
> >> Portland, Oregon USA
>
> >>http://twitter.com/kriswallsmith
>
> >> On Sep 24, 2010, at 2:38 PM, Fabien Potencier wrote:
>
> >>> On 9/24/10 8:23 PM, Jeremy Mikola wrote:
> >>>> Keeping the "large [unspoken] demographic" in mind, would it be feasible
> >>>> to make an app.config (formerly web.config) templating option so that
> >>>> the developer could easily override Symfony's internal default of
> >>>> "twig"?  I'm all for using Twig myself, but could easily see how having
> >>>> to add ":php" after each of my templates throughout the code would be
> >>>> annoying.  Similar to a few months ago, when ":php" was the default and
> >>>> we had to run around putting ":twig" into all of our controllers.
>
> >>> no, you cannot change the default. If you were able to do that, you would 
> >>> break templates from third-party bundles.
>
> >>> Fabien
>
> >>> --
> >>> 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 symfony-devs@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> symfony-devs+unsubscr...@googlegroups.com
> >>> 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 symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to