0

我正在使用来自 Opencart http://www.opencart.com/index.php?route=extension/extension/info&extension_id=20816&filter_search=page&page=2的自定义页面扩展

但问题是当我尝试在页面上放入模块时它没有出现。

模板文件看起来完好无损,我已经粘贴了下面的代码

<?php
class ControllerCustomHelloWorld extends Controller
{
    public function index(){

            // VARS
$this->language->load('custom/helloworld');
$this->data['breadcrumbs'] = array();
    // set title of the page
$this->document->setTitle("Register on AutoHouse Express");


    $this->data['heading_title'] = $this->language->get('heading_title');

        $this->data['button_continue'] = $this->language->get('button_continue');

        $this->data['description'] = '';

        $this->data['continue'] = $this->url->link('common/home');
            $template=$this->config->get('config_template') ."/template/custom/hello.tpl"; // .tpl location and file

    $this->load->model('custom/hello');

    $this->template = ''.$template.'';

    $this->children = array(

       'common/column_left',
        'common/column_right',
        'common/content_top',
        'common/content_bottom',
        'common/footer',
        'common/header'

    );      

    $this->response->setOutput($this->render());

}
}
?>

但由于某种原因,该页面不接受模块进入任何位置。

我很感激这方面的任何帮助。

谢谢。

4

1 回答 1

2

确保在为该页面创建布局时输入了正确的路线。

创建布局:
1. 进入 System>design>layouts
2. 点击“Insert layout”
3. 输入布局名称并使用 route as custom/helloworld
4. 保存
5. 现在在模块的布局选项中选择这个页面管理面板,您希望显示在这个新的自定义页面上。

于 2015-09-17T08:53:01.690 回答