Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

临时关闭layout的预期有问题 #25

Open
augushong opened this issue Sep 9, 2023 · 0 comments
Open

临时关闭layout的预期有问题 #25

augushong opened this issue Sep 9, 2023 · 0 comments

Comments

@augushong
Copy link

         View::fetch('login/ext/ulthon_login');
         View::layout(false)->fetch('login/ext/ulthon_login');

如上面两个代码,第一行,预期会渲染应用下login控制器的ext/ulthon_login文件。

第二行应该也会渲染这个文件,只是第二行渲染出来的内容不包括layout才对。
但实际上,第二行会导致到不到文件,两行代码生成的template文件如下:

"/www/wwwroot/admin.demo.ulthon.com/app/admin/view/login/index.html"
"login/ext/ulthon_login"

并不能正确匹配到控制器下的文件,好像是因为layout方法返回$this,实际上是templat类,但实际上,应该返回think-view类。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant