A TTemplate object represents a parsed PRADO control template.
It can instantiate the template as child controls of a specified control.
The template format is like HTML, with the following special tags introduced,
- component tags: a component tag represents the configuration of a component.
The tag name is in the format of com:ComponentType, where ComponentType is the component
class name. Component tags must be well-formed. Attributes of the component tag
are treated as either property initial values, event handler attachment, or regular
tag attributes.
- property tags: property tags are used to set large block of attribute values.
The property tag name is in the format of where AttributeName
can be a property name, an event name or a regular tag attribute name.
- group subproperty tags: subproperties of a common property can be configured using
- directive: directive specifies the property values for the template owner.
It is in the format of <%@ property name-value pairs %>;
- expressions: They are in the format of <%= PHP expression %> and <%% PHP statements %>
- comments: There are two kinds of comments, regular HTML comments and special template comments.
The former is in the format of , which will be treated as text strings.
The latter is in the format of , which will be stripped out.
Tags other than the above are not required to be well-formed.
A TTemplate object represents a parsed PRADO template. To instantiate the template
for a particular control, call {@link instantiateIn($control)}, which
will create and intialize all components specified in the template and
set their parent as $control.