MPFT :: t( String $tmpl, $default = null )
Outputs the value of this field in a supplied template with a placeholder for where the field value should be, but only if the value is not empty. Also accepts a fallback value to use in the template. If the supplied template does not contain a placeholder the phpquery library is used to create a mini dom structure and find the innermost point of that structure to place the tag – this is easier to demonstrate than to explain – see the example.
Parameters:
-
The string template with the string where the value of the field should be placed (or not, see the example).
-
$default = null