Update TemplateFunctions.php