zend-framework – 如何使用Zend中不同模块的部分视图?

我正在尝试从另一个模块栏访问foo中的部分视图.简化文件结构:
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)

是否有任何方法仍然将部分视图包含在我的内容页面中? (或者我做错了吗?)提前感谢.

你需要传递模块参数:
<?PHP echo $this->partialLoop('partial.phtml','bar',$this->paginator); ?>

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...