diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php index 138423c5414b8eda333974c68fc03002d9cc3001..b2fa78042f2d2654b553c04d87a68b63315a5a6a 100644 --- a/lib/SimpleSAML/XHTML/Template.php +++ b/lib/SimpleSAML/XHTML/Template.php @@ -38,6 +38,13 @@ class SimpleSAML_XHTML_Template */ private $template = 'default.php'; + /** + * The template name. + * + * @var string + */ + private $twig_template; + /* * Main Twig namespace, to avoid misspelling it *again* */ @@ -70,7 +77,7 @@ class SimpleSAML_XHTML_Template */ private function normalizeTemplateName($templateName) { - if (strripos($templateName, '.twig.html')) { + if (strripos($templateName, '.twig')) { return $templateName; } $phppos = strripos($templateName, '.php'); @@ -81,7 +88,7 @@ class SimpleSAML_XHTML_Template if ($tplpos) { $templateName = substr($templateName, 0, $tplpos); } - return $templateName.'.twig.html'; + return $templateName.'.twig'; } diff --git a/templates/_footer.twig.html b/templates/_footer.twig similarity index 100% rename from templates/_footer.twig.html rename to templates/_footer.twig diff --git a/templates/_header.twig.html b/templates/_header.twig similarity index 100% rename from templates/_header.twig.html rename to templates/_header.twig diff --git a/templates/base.twig.html b/templates/base.twig similarity index 87% rename from templates/base.twig.html rename to templates/base.twig index ad30a63353fc354ba7a5bf975ca3c0d674d65dee..6274c301e17c6cb1170c33a3c2c19fdedde986d5 100644 --- a/templates/base.twig.html +++ b/templates/base.twig @@ -15,14 +15,14 @@ <body> <div id="wrap"> - {% block header %}{% include "_header.twig.html" %}{% endblock %} + {% block header %}{% include "_header.twig" %}{% endblock %} <div id="content"> {% block content %}{% endblock %} </div><!-- #content --> <div id="footer"> - {% block footer %}{% include "_footer.twig.html" %}{% endblock %} + {% block footer %}{% include "_footer.twig" %}{% endblock %} </div> </div><!-- #wrap --> diff --git a/templates/index.twig.html b/templates/index.twig similarity index 98% rename from templates/index.twig.html rename to templates/index.twig index c8889341852b9f7ce8a6fbcd7899993670a4233b..2a6004aa06f112da48320488c242a7ad286dd17c 100644 --- a/templates/index.twig.html +++ b/templates/index.twig @@ -1,4 +1,4 @@ -{% extends "base.twig.html" %} +{% extends "base.twig" %} {% block content %} <div id="portalmenu" class="ui-tabs ui-widget ui-widget-content ui-corner-all"> <ul class="tabset_tabs ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> diff --git a/templates/sandbox.twig.html b/templates/sandbox.twig similarity index 88% rename from templates/sandbox.twig.html rename to templates/sandbox.twig index e37201e0c3667bd04c9978a7ed81adc196d31366..0d42e5e167194712301a8e4a369de1f20c06aad2 100644 --- a/templates/sandbox.twig.html +++ b/templates/sandbox.twig @@ -1,4 +1,4 @@ -{% extends "base.twig.html" %} +{% extends "base.twig" %} {% block content %} <p>This page exists as a sandbox to play with twig without affecting anything else. The template is in ./templates.</p> <p>{{ sometext }}</p>