I cannot find a good way to pass parameters to templates, but I have
several sub-optimal ways of doing it...

One is wrapper that adds a parameter:
void auth(alias View)(Request req, Response res) {
auto user = getLoggedInUser();
view(req, res, user);

This doesn't scale well, as all views needs this field, and I haven't
found a way to nest several wrappers.

Another way is to hijack the render method to add fields:
void render(string templateName, Params)(Response res, Request req) {
auto user = getLoggedInUser();

 vibe.http.server.render!(templateName, Params, user)(res, req);


 vibe.http.server.render!(templateName, Params)(res, req);


As you see, this allows me to only add the parameter if it makes sense. A
static if in the diet template could check if it's passed in (could share
a layout with a login/logout view even for static templates)
But I don't know how to do this for several parameters either.

The "best" way I've found is passing in the Request, and let the views
call helper methods in the application. I don't really like this approach
as I would like the static typing present, and want to keep my views as
dumb as possible.

So.. What's a good way to pass parameters to diet templates?