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

执行display的时候,模板文件路径会被在viewpath 和 模版名之间插入当前action的目录名 #174

Open
NextSeason opened this issue Jul 9, 2015 · 1 comment

Comments

@NextSeason
Copy link

执行display的时候,模板文件路径会被在viewpath 和 模版名之间插入当前action的目录名。
怎么设置才能不这样?
比如:setViewpath( '/a/b/c' );
当前action 在 my_actions目录,
display( 'home.html', $data ); 会去找 /a/b/c/my_actions/home.html 目录。我试了很久没有找到办法

@sunmenghua
Copy link

貌似目前不能这样使用。

$this->getView()->display(string $view_path, array $tpl_vars = NULL)
中$view_path指的是模板基目录到该模板的的路径及模板名称

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

2 participants