最新消息: 新版网站上线了!!!

ECshop增加可编辑的模版页面

1复制index.php为loot.php

2更改

/* 缓存编号 */

$cache_id = sprintf('%X', crc32($_SESSION['user_rank'] . '-' . $_CFG['lang']));

 

if (!$smarty->is_cached('index.dwt', $cache_id)) // 1

 

$smarty->display('index.dwt', $cache_id);  //2

 

上面的index.dwt为loot.dwt

 

3 在themes的模板文件夹里复制index.dwt为loot.dwt

 

4 admin/includes/lib_template.php

  /* 可以设置内容的模板 */

$template_files = array(

    'index.dwt',

    'loot.dwt',//增加

 

 

/* 每个模板允许设置的库项目 */

  'index' => array(

        '/library/ur_here.lbi' => 0,

        '/library/search_form.lbi' => 0,

        '/library/member.lbi' => 0,

        '/library/new_articles.lbi' => 0,

        '/library/category_tree.lbi' => 0,

        '/library/top10.lbi' => 0,

        '/library/invoice_query.lbi' => 0,

        '/library/recommend_best.lbi' => 3,

        '/library/recommend_new.lbi' => 3,

        '/library/recommend_hot.lbi' => 3,

        '/library/recommend_promotion.lbi' => 3,

        '/library/group_buy.lbi' => 3,

        '/library/auction.lbi' => 3,

        '/library/brands.lbi' => 0,

        '/library/promotion_info.lbi' => 0,

        '/library/cart.lbi' => 0,

        '/library/order_query.lbi' => 0,

        '/library/email_list.lbi' => 0,

        '/library/vote_list.lbi' => 0

    ),  

 

//复制index的,具体的根据需要更改

'loot' => array(

        '/library/ur_here.lbi' => 0,

        '/library/search_form.lbi' => 0,

        '/library/member.lbi' => 0,

        '/library/new_articles.lbi' => 0,

        '/library/category_tree.lbi' => 0,

        '/library/top10.lbi' => 0,

        '/library/invoice_query.lbi' => 0,

        '/library/recommend_best.lbi' => 3,

        '/library/recommend_new.lbi' => 3,

        '/library/recommend_hot.lbi' => 3,

        '/library/recommend_promotion.lbi' => 3,

        '/library/group_buy.lbi' => 3,

        '/library/auction.lbi' => 3,

        '/library/brands.lbi' => 0,

        '/library/promotion_info.lbi' => 0,

        '/library/cart.lbi' => 0,

        '/library/order_query.lbi' => 0,

        '/library/email_list.lbi' => 0,

        '/library/vote_list.lbi' => 0

    ),

 

5 在 languages\zh_cn\admin\template.php

增加

 

/* 每一个模板文件对应的语言 */

$_LANG['template_files']['loot'] = '抢购页面自定义模板';

 

6 修改 /模版文件夹/libs.xml

增加<file name="loot.dwt"/>文件,必须按字母排序插入

转载请注明:谷谷点程序 » ECshop增加可编辑的模版页面