From 2d1940522cba9df94b4f32b43edcffb828e2d6f9 Mon Sep 17 00:00:00 2001 From: wolfcode <37436228+wolf-leo@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:35:54 +0800 Subject: [PATCH] fix(View): automatically determine the template path if it is empty - Add logic to automatically set the template path based on the controller and action if not explicitly defined - Improve consistency in the 'iframeOpenTop' configuration by adding missing commas --- app/common/controller/AdminController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/controller/AdminController.php b/app/common/controller/AdminController.php index 3fd7b17..3934872 100644 --- a/app/common/controller/AdminController.php +++ b/app/common/controller/AdminController.php @@ -134,7 +134,7 @@ class AdminController extends BaseController if ($layout) View::instance()->engine()->layout('/layout/default'); View::assign($vars); if (empty($template)) { - $template = strtolower(str_replace('.', '/', $this->request->controller()) . '/' . $this->request->action()); + $template = strtolower(str_replace('.', '/', $this->request->pathinfo())); } return View::fetch($template); }