Template plugin variables work in the same way as skin plugin vars. There are two differences:
$skinType parameter. Instead, they take extra parameters with info on the item and comment that is currently being parsed:
doTemplateVar-method gets a &$item parameter.doTemplateCommentsVar-method gets an &$item parameter as well as a &$comment parameter.Template variables are called in exactly the same way as skinvars (using <%plugin(PlugName,parameters)%> or <%PlugName(parameters)%>)
By default, all template variables are passed on to the doSkinVar-method, using 'template' as skinType-parameter.
If you want to provide your own implementation, you'll need to redefine the method doTemplateVar and/or doTemplateCommentsVar. It works in the same way as doSkinVar, except that now the skinType-parameter is missing.
function doTemplateVar(&$item)
function doTemplateVar(&$item, $param1, $param2)
function doTemplateVar(&$item, $type, $param1, $param2)
function doTemplateVar(&$item, $type, $param1 = 'default value')
function doTemplateCommentsVar(&$item, &$comment)
function doTemplateCommentsVar(&$item, &$comment, $param1, $param2)
function doTemplateCommentsVar(&$item, &$comment, $type, $param1, $param2)
function doTemplateCommentsVar(&$item, &$comment, $type, $param1 = 'default value')
$currentTemplateName