Returns a reference to the global template object, only creating it if it doesn't already exist. The object returned will be of type JTemplate.
This method is retained for backwards compatibility only. The patTemplate templating system is no longer used.
object JTemplate getTemplate()
In this example, the global template object is retrieved.
$template =& JFactory::getTemplate();