Le 26/05/2011 18:35, Oleg Stepura a écrit :
What if I cannot use Twig?

Due to the fact that Symfony allows to use*multiple* Templating Engines (which eventually could become PHPTAL, Dwoo, etc) it would be good to have any possible and not ugly solution for this problem which later could be used in any Templating Engine.

I personally have an application which is in the move towards Symfony but cannot be moved to another templating engine yet. As a middle solution was to have helpers from PHP engine inside our templating engine to render forms and so on.
The way the forms are rendered depends of the templating engine you use as this is about rendering. Using a single implementation for all engines is not a good idea as this means that the form rendering is not integrate with the engine (the way it is done for Twig corresponds to the way Twig should be extended: using twig functions to render the different part). Thus, if you were using Smarty in your project (assuming someone write a bundle integrating Smarty with the Tempalting component) you would still need another engine for the rendering of the forms and overwriting it would require you to learn this syntax as it would not be doable with a Smarty template.

The PHP engine does not support themes because it works in a totally different way currently: it uses a different template for each type wheras Twig uses a different block inside a single template which makes it far easier to replace the used template.

--
Christophe | Stof

--
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