Is it possible to have nested JavaScript template tags e.g.
Are okay with using jQuery? If so, this very possible (and even, dare I say, common):
http://blog.reybango.com/2010/07/12/jquery-javascript-templates-tutorial-nesting-templates/