Class CamlGI.Template.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 : Pervasives.out_channel -> unit
Write the template to a channel.
method output : (string -> unit) -> unit
output out outputs the template, calling out s for each write of a string s.
method source : string
Return the original source code for the template.