0

我有一个“存储”模块,我需要将它的输出放在由 /catalog/view/theme/journal2/template/journal2/menu/main.tpl 呈现的菜单中

它的控制器在 catalog/controller/journal2/menu.php

我尝试过的:

 <file path="catalog/controller/journal2/menu.php">
    <operation>
    <search><![CDATA[$this->template = $this->config->get('config_template') . '/template/journal2/menu/main.tpl';]]></search>
    <add position="before"><![CDATA[
    $data['ac_all_stores'] = $this->load->controller('module/store');
    ]]></add>
    </operation>
</file>

 <file path="catalog/controller/module/store.php">
    <operation>
    <search><![CDATA[return $this->load->view($this->config->get('config_template') . '/template/module/store.tpl', $data);]]></search>
    <add position="after"><![CDATA[
    $this->load->view($this->config->get('config_template') . 'template/journal2/menu/main.tpl', $data);
    ]]></add>
    </operation>
</file>

但这些都不起作用。模块的输出在菜单的 main.tpl 中仍然不可见,谁能告诉我该怎么做?提前致谢!

4

1 回答 1

0

我设法解决了这个问题

    $this->data['ac_all_stores'] = $this->load->controller('module/store');

代替

   $data['ac_all_stores'] = $this->load->controller('module/store');
于 2017-02-23T14:23:18.510 回答