[% typetitle = factory.title(type) %]

[% IF thing %] edit [% thing.class_title %] '[% thing.title %]' [% ELSE %] add a new [% typetitle %] [% END %]

title

description

[% INCLUDE "edit/${type}.html" %]

This doesn't work with SQLite at the moment: bind_params seem to unbind and updates fail.