Hi, I wrote a simple shell script to convert symfony helpers into Twig extensions,
check here: http://github.com/videlalvaro/sfTwigPlugin The idea is that you move to the sfTwigPlugin folder and then run ./helpers.sh /path/to/syfmony/lib/helper/ This will create the extension classes inside lib/extensions Then somewhere in your code you can add them by calling: $twig->addExtension(new Url_Twig_Extension()); //load the UrlHelper extension It's really alpha, because I haven't had time to test it in detail. I tried with some simple templates and it worked. I don't know with all the parameters accepted by all the helpers, etc, but I think it can be the base for future work. Cheers, Alvaro On Oct 12, 2009, at 3:44 AM, Henrik Bjornskov wrote: > > your are then invited to help :) throw me a message on github (im > henrikbjorn) and ill see to it that u get access or fork it. > > On Oct 11, 12:20 am, admi99 <[email protected]> wrote: >> It's great. >> I've read about Twing a few minutes ago. I thought I could do >> sfTwingPlugin but you're faster. >> >> On 10 Paź, 23:50, Henrik Bjornskov <[email protected]> wrote: >> >>> Hey people :) >> >>> I started the sfTwigPlugin on >>> githubhttp://github.com/henrikbjorn/sfTwigPlugin/ >>> and will be talking about the process etc athttp://henrikbjorn.tumblr.com >>> . >> >>> At this point the sfTwigView class is almost complete with one >>> little >>> change to make, and that is to swap the file system loader with a >>> file >>> system array loader (load templates from multiple locations). Then >>> the >>> next step will be to make extensions for Twig providing the Helper >>> functionality we have in Symfony. >> >>> Fabien the helpers should they be filters or tags ? >> >>> On Oct 9, 4:26 pm, Fabien Potencier <fabien.potenc...@symfony- >> >>> project.com> wrote: >>>> Annis McKenzie wrote: >>>>> Hey all, >> >>>>> as Fabien already offered to help getting the development of a >>>>> sfTwigPlugin started, I'd like to ask him: What would be >>>>> necessary to >>>>> develop this kind of a plugin? I don't know where to start, do >>>>> we have >>>>> to write a new view layer class? >> >>>>> Would there be a huge difference with the programming to support >>>>> sf1.2 >>>>> AND 1.3? >> >>>> The view in symfony 1.2 and 1.3 is, as far as I remember, exactly >>>> the >>>> same. So, the plugin will work with 1.2, 1.3, and 1.4. >> >>>> If we need to make some simple changes to support Twig more >>>> easily in >>>> the symfony view system, that's also possible, but only if it >>>> does not >>>> break BC. That should be done fast as the feature freeze is >>>> targeted for >>>> the end of next week. >> >>>> Fabien >> >>>>> Cheers and thanks! >> >>>>> Daniel > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
