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
This commit is contained in:
wolfcode
2025-01-08 14:35:54 +08:00
parent 264cf56ae4
commit 2d1940522c

View File

@@ -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);
}