yaf icon indicating copy to clipboard operation
yaf copied to clipboard

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

Open NextSeason opened this issue 9 years ago • 1 comments

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

NextSeason avatar Jul 09 '15 21:07 NextSeason

貌似目前不能这样使用。

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

sunmenghua avatar Jul 10 '15 02:07 sunmenghua