From 70e4ed69f3401a895d29415f9ca523dc637c5c8e Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Sat, 29 Apr 2017 03:41:38 +0200 Subject: Template method "get" is now used to get the previously defined name of the page (instead of typing it twice). --- 403.php | 2 +- 404.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/403.php b/403.php index 24789a9..d0bcf87 100644 --- a/403.php +++ b/403.php @@ -15,7 +15,7 @@ http_response_code(403); try { $MainTemplate = Template\Factory::build('main'); $MainTemplate->set('NAME', '403 Forbidden'); - $MainTemplate->set('HEAD', ['NAME' => '403 Forbidden']); + $MainTemplate->set('HEAD', ['NAME' => $MainTemplate->get('NAME')]); $MainTemplate->set('HTML', Template\Factory::build('403')); echo $MainTemplate; diff --git a/404.php b/404.php index a90803b..2da35cc 100644 --- a/404.php +++ b/404.php @@ -15,7 +15,7 @@ http_response_code(404); try { $MainTemplate = Template\Factory::build('main'); $MainTemplate->set('NAME', '404 Not Found'); - $MainTemplate->set('HEAD', ['NAME' => '404 Not Found']); + $MainTemplate->set('HEAD', ['NAME' => $MainTemplate->get('NAME')]); $MainTemplate->set('HTML', Template\Factory::build('404')); echo $MainTemplate; -- cgit v1.2.3