Hi,
I'm trying to figure out how to use "dynamic" template names. "Dynamic" = "not known at compile time". Let's say, i have a database of documents, each have "title", "content" and "template" fields, where "template" is an actual Diet template filename (e.g. "article.dt"). I want to read template filename along with other data and feed it to render function.
I've tried the most straightforward way:

...
string tpl = readFromDB(docId);
res.render!(tpl, someParams);
...

However, I'm getting an error: "variable tpl cannot be read at compile time".
While I understand the reasons of this approach not to work, I can't find an elegant way of solving this. Is there any way to "prerender" a bunch of templates, to explicitly tell compiler what possible templates I'm going to use? Quick look at the docs gives me compileDietFile function, but I'm not sure I understand how it works.