ecstore 新增模块(页面)

1、custom\b2c\site.xml  新增

<module id='b2c' controller='site_employee' >
        <name>employee</name>
        <title>企业员工</title>
        <disable>false</disable>
    </module>

2、b2c下面新增employee.php

class b2c_ctl_site_employee extends b2c_frontpage
{
    function __construct(&$app)
    {
        parent::__construct($app);
//        $shopname = app::get('site')->getConf('site.name');
//        if (isset($shopname)) {
//            $this->title = app::get('b2c')->_('员工中心') . '_' . $shopname;
//            $this->keywords = app::get('b2c')->_('员工中心') . '_' . $shopname;
//            $this->description = app::get('b2c')->_('员工中心') . '_' . $shopname;
//        }
//        
//        $this->member = $this->get_current_member();
       
        /** end **/
    }
    function index()
    {
        $this->set_tmpl('employee');
        $this->page('site/employee/index.html');
    }
}

3、Ecstore添加自定义的模板页面类型

第一步:

修改/app/site/lib/theme/tmpl/dbsave.php和/app/site/lib/theme/tmpl/fssave.php中的函数:

__get_tmpl_list,"qf_willow" 为app/自建模块/site.xml中的module>name

第二步:

在自建模块的controller中,模板文件输出(即  $this->page('site/qf_willow.html'); )前添加:  $this->set_tmpl('qf_willow');

update app

 

转载于:https://www.cnblogs.com/limonyun/p/9151389.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值