c.literalCall ([target : xlink], method : string, [name : string, value : string]*) : string
The function literalCall allows you to execute a method on a remote object and utilize the rendering result.
An xlink or a method name can be given as a parameter. The method name is optional if an xlink has been given without further parameters (name, value).
The first example executes the method teaser and prints the result into the output.
The second example executes the method teaser with the arguments mode and border and stores the result in a variable. If the result was not empty, a headline is placed before the teaser content.
Literal output may contain html or xml data. Due to xml conformance, textual data written into the output document will be escaped. By adding the attribute disable-output-escaping="yes" to the value-of element, the output is written as a raw value into the xml based stream.
The following example utilitizes the tag variant of a literalCall:
The tag variant is the usual way to embed literal output of a remote method. The attributes id and method are reserved. If no method name is given, the system implies the method name default. If no id is specified, the current object of the rendering context will be used.
The tag based variant allows conditional arguments:
In this example, the argument is specified, if the variable teasersRequireBorder contains the value true.