From cda97ddad4025b418c45a9b67c6f76de1486b1de Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 4 Nov 2023 15:09:47 +0100 Subject: [PATCH] use tpl appendPath --- src/Frontend.php | 5 +---- src/FrontendUrl.php | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Frontend.php b/src/Frontend.php index 1c3e682..3dfa7e4 100644 --- a/src/Frontend.php +++ b/src/Frontend.php @@ -27,10 +27,7 @@ class Frontend extends Process return false; } - App::frontend()->template()->setPath( - App::frontend()->template()->getPath(), - My::path() . DIRECTORY_SEPARATOR . 'default-templates' - ); + App::frontend()->template()->appendPath(My::path() . DIRECTORY_SEPARATOR . 'default-templates'); App::behavior()->addBehaviors([ 'initWidgets' => Widgets::init(...), diff --git a/src/FrontendUrl.php b/src/FrontendUrl.php index 6a51e24..fdb52c8 100644 --- a/src/FrontendUrl.php +++ b/src/FrontendUrl.php @@ -179,7 +179,7 @@ class FrontendUrl extends Url } } - App::frontend()->template()->setPath(App::frontend()->template()->getPath(), My::path() . '/default-templates'); + App::frontend()->template()->appendPath(My::path() . '/default-templates'); self::serveDocument('kutrl.html'); } @@ -191,7 +191,7 @@ class FrontendUrl extends Url return; } - App::frontend()->template()->setPath(App::frontend()->template()->getPath(), My::path() . '/default-templates'); + App::frontend()->template()->appendPath(My::path() . '/default-templates'); header('Content-Type: text/html; charset=UTF-8'); Http::head(404, 'Not Found');