Plasma GitLab Archive
Projects Blog Knowledge

Class Netcgi_modtpl.template

class template : ?filename:string -> string -> object .. end

new template ?filename tpl computes a new template from the string tpl. Once the object has been created, it can be used in a single thread.

filename : if set, it is used to determine the base path for ::include():: tags in the template (default: current directory) and to reuse the templates of already compiled files (e.g. headers, footers,...).

method set : string -> string -> unit

Set a variable in the template.

method table : string -> table_row list -> unit

Set a table in the template.

method conditional : string -> bool -> unit

Set a conditional in the template.

method callback : string -> (string list -> string) -> unit

Set a callback in the template.

method to_string : string

Return the template as a string.

method to_channel : Stdlib.out_channel -> unit

Write the template to a channel.

method output : Netcgi.cgi -> unit

output cgi outputs the template to the CGI session cgi.

method source : string

Return the original source code for the template.

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml