ecshop自定义页面增加模板功能方法

自定义一个页面 并且配了一个自定义模版  但是模版后台设置库文件的时候  下拉列表里没有我新建的那个模版

过程如下:

自定义页面名称 record.php(复制index.php),自定义模版  record.dwt(复制index.dwt)
——————把record.php文件中原有的index.dwt替换成record.dwt

但是我想在record.php这个文件里调用库文件,比如调用精品推荐 ,要在后台修改调用精品推荐的数量

修改 languages\zh_cn\admin\template.php

增加了  $_LANG['template_files']['record'] = '录音分类页模版';

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

  2. $_LANG['template_files']['article'] = '文章内容模板';

  3. $_LANG['template_files']['article_cat'] = '文章分类模板';

  4. $_LANG['template_files']['brand'] = '品牌专区';

  5. $_LANG['template_files']['catalog'] = '所有分类页';

  6. $_LANG['template_files']['category'] = '商品分类页模板';

  7. $_LANG['template_files']['flow'] = '购物流程模板';

  8. $_LANG['template_files']['goods'] = '商品详情模板';

  9. $_LANG['template_files']['group_buy_goods'] = '团购商品详情模板';

  10. $_LANG['template_files']['group_buy_list'] = '团购商品列表模板';

  11. $_LANG['template_files']['index'] = '首页模板';

  12. $_LANG['template_files']['record'] = '录音分类页模版';

  13. $_LANG['template_files']['search'] = '商品搜索模板';

  14. $_LANG['template_files']['compare'] = '商品比较模板';

  15. $_LANG['template_files']['snatch'] = '夺宝奇兵';

  16. $_LANG['template_files']['tag_cloud'] = '标签云模板';

  17. $_LANG['template_files']['brand'] = '商品品牌页';

  18. $_LANG['template_files']['auction_list'] = '拍卖活动列表';

  19. $_LANG['template_files']['auction'] = '拍卖活动详情';

修改 admin/includes/lib_template.php
增加     'record.dwt',

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

  2. $template_files = array(

  3. 'index.dwt',

  4. 'record.dwt',

  5. 'article.dwt',

  6. 'article_cat.dwt',

  7. 'brand.dwt',

  8. 'catalog.dwt',

  9. 'category.dwt',

  10. 'user_clips.dwt',

  11. 'compare.dwt',

  12. 'gallery.dwt',

  13. 'goods.dwt',

  14. 'group_buy_goods.dwt',

  15. 'group_buy_flow.dwt',

  16. 'group_buy_list.dwt',

  17. 'user_passport.dwt',

  18. 'pick_out.dwt',

  19. 'receive.dwt',

  20. 'respond.dwt',

  21. 'search.dwt',

  22. 'flow.dwt',

  23. 'snatch.dwt',

  24. 'user.dwt',

  25. 'tag_cloud.dwt',

  26. 'user_transaction.dwt',

  27. 'style.css',

  28. 'auction_list.dwt',

  29. 'auction.dwt',

  30. );

增加:

  1. 'record' => array(

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  17. '/library/vote_list.lbi' => 0

  18. ),

(0)

相关推荐