On 10/21/10 7:36 PM, Lukas Kahwe Smith wrote:
On 20.10.2010, at 17:08, Thibault D wrote:
Yeah I know (and agree) Twig is the default for Bundles. It was not
the case when we wrote DoctrineUserBundle and ForumBundle, that's the
reason why templates are in PHP.
Any contribution to translate them to Twig is welcome :)
with the two pull requests jordi just send:
See pull request at http://github.com/fabpot/symfony/pull/100
And in case it has to be fixed, I made a pull request:
http://github.com/fabpot/symfony/pull/99
the twig-yfied version of DoctrineUserBundle is more or less ready:
http://github.com/liip/DoctrineUserBundle
as you can see the in the process we also added calls to translation API, split
the templates to enable better selective reuse and added support for twig form
themes.
I would appreciate some feedback on the approach taken. also not so sure about
the naming convention we used:
for example the old new.php is now split into new.twig which does the extend
call and the include to a new_content.twig
http://github.com/liip/DoctrineUserBundle/blob/master/Resources/views/Session/new.twig
http://github.com/liip/DoctrineUserBundle/blob/master/Resources/views/Session/new_content.twig
{% if _view.session.hasFlash('doctrine_user_session_create/error') %}
_view should not never be used IMHO. We should have a proper tag/filter
instead.
Fabien
I also wonder if the "theme" option I added should be part of the standard
options:
http://github.com/liip/DoctrineUserBundle/blob/master/Form/SessionForm.php
Finally I wonder if we should have something to render a<form> tag:
<form action="{% route 'doctrine_user_session_create' %}" {{ form|render_enctype }
method="POST" class="doctrine_user_session_new">
Especially the enctype stuff is easy to forget, but would limit the
extensibilty of a template.
regards,
Lukas Kahwe Smith
[email protected]
--
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