diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php
index cbac41a202705c837aceaaffcf3a656f947b101a..ef9e0e6b788478d43beb97f0ce2eaaa765dc0159 100644
--- a/lib/SimpleSAML/XHTML/Template.php
+++ b/lib/SimpleSAML/XHTML/Template.php
@@ -142,6 +142,17 @@ class Template extends Response
     }
 
 
+    /**
+     * Get the normalized template name.
+     *
+     * @return string The name of the template to use.
+     */
+    public function getTemplateName()
+    {
+        return $this->normalizeTemplateName($this->template);
+    }
+
+
     /**
      * Normalize the name of the template to one of the possible alternatives.
      *