Skip to content

Commit 6fecf93

Browse files
committed
Removed html extension on twig files
1 parent 54e4791 commit 6fecf93

6 files changed

Lines changed: 13 additions & 6 deletions

File tree

lib/SimpleSAML/XHTML/Template.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ class SimpleSAML_XHTML_Template
3838
*/
3939
private $template = 'default.php';
4040

41+
/**
42+
* The template name.
43+
*
44+
* @var string
45+
*/
46+
private $twig_template;
47+
4148
/*
4249
* Main Twig namespace, to avoid misspelling it *again*
4350
*/
@@ -70,7 +77,7 @@ public function __construct(\SimpleSAML_Configuration $configuration, $template,
7077
*/
7178
private function normalizeTemplateName($templateName)
7279
{
73-
if (strripos($templateName, '.twig.html')) {
80+
if (strripos($templateName, '.twig')) {
7481
return $templateName;
7582
}
7683
$phppos = strripos($templateName, '.php');
@@ -81,7 +88,7 @@ private function normalizeTemplateName($templateName)
8188
if ($tplpos) {
8289
$templateName = substr($templateName, 0, $tplpos);
8390
}
84-
return $templateName.'.twig.html';
91+
return $templateName.'.twig';
8592
}
8693

8794

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
<body>
1616
<div id="wrap">
1717

18-
{% block header %}{% include "_header.twig.html" %}{% endblock %}
18+
{% block header %}{% include "_header.twig" %}{% endblock %}
1919

2020
<div id="content">
2121
{% block content %}{% endblock %}
2222
</div><!-- #content -->
2323

2424
<div id="footer">
25-
{% block footer %}{% include "_footer.twig.html" %}{% endblock %}
25+
{% block footer %}{% include "_footer.twig" %}{% endblock %}
2626
</div>
2727

2828
</div><!-- #wrap -->
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends "base.twig.html" %}
1+
{% extends "base.twig" %}
22
{% block content %}
33
<div id="portalmenu" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
44
<ul class="tabset_tabs ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends "base.twig.html" %}
1+
{% extends "base.twig" %}
22
{% block content %}
33
<p>This page exists as a sandbox to play with twig without affecting anything else. The template is in ./templates.</p>
44
<p>{{ sometext }}</p>

0 commit comments

Comments
 (0)