我们的使命

助力跨境卖家高效建立全球销售网络

喜报2021年我司获《江苏省国家高新技术企业》认定

分类目录

文章标签

热门推荐

相关咨讯

opencart架构网站,magento模板创建

2022-11-04 10:40:07 - 米境通跨境电商

    

    在opencart中假如我想创建一个侧边栏模块sidebar,让每一个页面都可以复用,步骤如下:

    1.在controller/module目录下新建sidebar.php文件。

    2.添加文件内容为:

    classControllerModuleSidebarextendsController{

    protectedfunctionindex($setting){

    $this->template=$this->config->get('config_template').'/template/module/sidebar.tpl';

    $this->render();

    }

    }

    3.在template/module创建sidebar.tpl模板文件。

    4.在调用的controller引用:

    $this->data['sidebar']=$this->getChild('module/sidebar');

    5.在模板文件使用:

    echo$sidebar;
    联系我们
  • 24H客服
  • 联系电话:16651690460(龙经理)
  • 微信咨询:
南京天遥路联网络科技有限公司,版权所有 Copyright By ©米境通ERP4.0,2015-2025,苏ICP备:苏ICP备15044100号-4, 苏公网安备:32011402011043