vibe.d beta banner
get vibe.d

Asynchronous I/O that doesn’t get in your way, written in D

Function render

Renders the given template and makes all ALIASES available to the template.

void render(string template_file, ALIASES...) (
  HTTPServerResponse res
) @property;

This currently suffers from multiple DMD bugs - use renderCompat() instead for the time being.

You can call this function as a member of HTTPServerResponse using D's uniform function call syntax.


string title = "Hello, World!";
int pageNumber = 1;
res.render!("mytemplate.jd", title, pageNumber);

Sönke Ludwig, Jan Krüger, Ilya Shipunov


© 2012-2013 RejectedSoftware e.K.


Subject to the terms of the MIT license, as written in the included LICENSE.txt file.