Through PHP, you can create custom tags which can be used within a template. To do this, you create a function whose name begins with "wt". The next letter of the name should be capitalised. The tag which is created will have the same name as the function name without the "wt" and with the first letter as lowercase. The first parameter of the function will be an associative array or the attributes which are in the tag. The second argument will represent the context the tag was used in. It should be an optional argument with its default an empty array. For example, if the tag was used with a <wt:node> tag, the attributes of the node selected with <wt:node> will be passed to the function.
An Example:
<?php
function wtCustomTag($attributes, $context = Array()) {
if(array_key_exists("name", $attributes)) {
print "hello" . $attributes["name"];
}
}
?>
Then in a template you can have:
<wt:customTag name="Jane Doe"/>