limonade+twig?

60 views
Skip to first unread message

nooga

unread,
Jul 21, 2010, 5:42:21 PM7/21/10
to Limonade
Hi,

I'm a bit fed up with using php as a template engine, since it does
not have caching out of box and is generally annoying to write. I was
wondering if i could replace php templates with something else. Haml
was the first engine that came to my mind but it turned out that
designers don't like it. And then i found Twig (http://www.twig-
project.org/). And here's my question: How to marry limonade with
Twig?

Currently I have a function twig($template, $variables) that returns
template rendered with specified variables.
I'd love to modify layout() and render[_partial]() to use Twig engine
but i don't know if it's even possible since Twig uses
inheritance&blocks approach.

I'd be extremely greatful for some ideas/hints etc.

Cheers,
Martin

Fabrice Luraine

unread,
Jul 22, 2010, 12:09:06 PM7/22/10
to Limonade
Hello,

I would probably do the same as you've done: some function wrappers
like your twig($template, $vars) function.
I think it's simpler than tweaking core functions and it let it
independant from an external template engine.

++ Fabrice
Reply all
Reply to author
Forward
0 new messages