vibe.d beta banner
get vibe.d
0.7.30

Function render

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

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

Prototype

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

See also

vibe.templ.diet.compileDietFile

Examples

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

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

Copyright

© 2012-2013 RejectedSoftware e.K.

License

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