twigkit / tempo

Tempo is an easy, intuitive JavaScript rendering engine that enables you to craft data templates in pure HTML.
http://tempojs.com/
Apache License 2.0
709 stars 73 forks source link

Template Tags not working in Tempo 2.0 #73

Open philllies opened 11 years ago

philllies commented 11 years ago

Hi there,

I tried to use template tags like these

{% if javascript-expression %} ... {% else %} ... {% endif %}

but they don't seem to be working in Tempo 2.0, even though their use is stated in the documentation.

difrnt commented 11 years ago

Can you create a jsfiddle with an example? I use Tempo 2.0 and these tags and have no problems.

philllies commented 11 years ago

I tried a very basic template and it worked with Tempo 2.0. However, it does not with the following template: http://jsfiddle.net/9JYnV/1/

mrolafsson commented 11 years ago

Yes, you're right - and I think this is something to do with tables (which are always a problem): http://jsfiddle.net/ycxJs/4/ I'll have a look at this today! Thanks for reporting!

mrolafsson commented 11 years ago

I think there might be a problem with conditional template tag in nested templates - looks to me like they're processed as a part of the main template iteration (before it gets to nested)? Can you anyone confirm that?

mrolafsson commented 11 years ago

This is obviously fixed in Tempo 3.0 since templates are preprocessed and cached (not processed in one go) and fixing this in 2.0 could be very tricky. Are we happy to leave this until 3.0?

mrolafsson commented 10 years ago

Sorry for the radio silence. Are you still using Tempo? Would you be interested in it's continued development?