diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index e92e03bffb..231309cecb 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -1210,6 +1210,10 @@ public function templateFormat($var = null) $this->template_format = $var; } + if (empty($this->template_format)) { + $this->template_format = $this->url_extension; + } + if (empty($this->template_format)) { $this->template_format = Grav::instance()['uri']->extension('html'); } @@ -2956,7 +2960,7 @@ protected function adjustRouteCase($route) } } - /** + /** * Gets the Page Unmodified (original) version of the page. * * @return Page