Function HTTPServerResponse.renderCompat

Deprecated - use render instead.

This version of render() works around an old compiler bug in DMD < 2.064 (Issue 2962).

The first template argument is the name of the template file. All following arguments must be pairs of a type and a string, each specifying one parameter. Parameter values can be passed either as a value of the same type as specified by the template arguments, or as a Variant which has the same type stored.

Note that the variables are copied and not referenced inside of the template - any modification you do on them from within the template will get lost.

Prototype

void renderCompat(string template_file, TYPES_AND_NAMES...)(
  void ...
);

Examples

string title = "Hello, World!";
int pageNumber = 1;
res.renderCompat!("mytemplate.jd",
	string, "title",
	int, "pageNumber")
	(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.