A pure JavaScript implementation of Template Toolkit 2
This is far from complete, and if you try anything more advanced than
IF it will likely not work. It now seems to be largely complete for
basic control structures and variable access.
Also this will only work in gecko based browsers (Firefox, Camino et
al.) since neither Safari nor IE have decent Javascript support, and while I'm
developing it, I want to use the tools that make it easier for me. It
now works in Safari! I've not checked IE, but… meh.
The code, which is currently released under an MIT license is here.
What about Jemplate?
Jemplate is all well and good, but it requires you to generate the templates using perl on the server. If like me and you think Server Side JavaScript is a good idea, then it isn't much use. Plus I like doing stupid crazy things cos “it seemed like a good idea at the time”.
A Changelog of sorts
- 21st Dec, 2008
WRAPPER and BLOCK seem to be fully working, and we now pass t/wrapper.t, t/binop.t, t/block.t, t/vars.t and t/varsv1.t