Implicit algorithms in templates

I was thinking about implicit algorithms and implicit datastructures and thought how this applied to templates in web applications. I found that there are a few places where I write the same template code with just a few different pieces. One of the examples is a piece of code for showing a text field with a few labels around it. This piece of template code is used for almost every field in the product edit (and new) form....

March 5, 2012

Executing code from templates

Until today I couldn’t use variables in my template that are pieces of code. I added one piece of code that executes the piece of code in a the stash and returns its value. In the template it looks like this. [% FOR p IN products %] <p>[% p.name %] [% END %] There are two places in this piece of code that could contain code references. The first is products....

August 31, 2010