From 34bb5702f3c8fa274a0d32c95bfaa7245bdd7a8f Mon Sep 17 00:00:00 2001 From: Joan <47475754+joanrodas@users.noreply.github.com> Date: Thu, 28 Dec 2023 17:04:40 +0100 Subject: [PATCH] Fix closure --- PluboRoutes/Route/Route.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PluboRoutes/Route/Route.php b/PluboRoutes/Route/Route.php index b9c11f9..7da2f45 100644 --- a/PluboRoutes/Route/Route.php +++ b/PluboRoutes/Route/Route.php @@ -70,6 +70,8 @@ public function hasTemplateCallback() public function getTemplate() { $template_name = $this->template; + if($this->hasTemplateCallback()) return $template_name; + $custom_directory = $this->config['template_path'] ?? ''; // Check if a custom directory is provided