我正试图从foo访问酒吧的局部视图。简化文件结构:如何在Zend中使用来自不同模块的局部视图?
application/
modules/
foo/
index.phtml
bar/
partial.phtml
而且在的index.html你有下面的代码:
<?php echo $this->partialLoop('../bar/partial.phtml', $this->paginator);
echo $this->paginator; ?>
的问题是,你不能真正使用父对象的遍历,因为我得到这个错误:
Requested scripts may not include parent directory traversal ("../", "..\" notation)
有没有办法将部分视图包含到我的内容页面中? (或者我做错了吗?)提前致谢。
哦,太棒了;非常感谢。假设这对辅助者也是有效的? – levivanzele 2011-04-08 20:09:59
取决于你试图访问什么和如何。看看有关帮助程序或组件的API或完整文档。 – prodigitalson 2011-04-08 20:12:30