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

2016-06-13 13:05 来源:www.chinab4c.com 作者: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'] = '录音分类页模版'; /* 每一个模板文件对应的语言 */ $_LANG['template_files']['article'] = '文章内容模板'; $_LANG['template_files']['article_cat'] = '文章分类模板'; $_LANG['template_files']['brand'] = '品牌专区'; $_LANG['template_files']['catalog'] = '所有分类页'; $_LANG['template_files']['category'] = '商品分类页模板'; $_LANG['template_files']['flow'] = '购物流程模板'; $_LANG['template_files']['goods'] = '商品详情模板'; $_LANG['template_files']['group_buy_goods'] = '团购商品详情模板'; $_LANG['template_files']['group_buy_list'] = '团购商品列表模板'; $_LANG['template_files']['index'] = '首页模板'; $_LANG['template_files']['record'] = '录音分类页模版'; $_LANG['template_files']['search'] = '商品搜索模板'; $_LANG['template_files']['compare'] = '商品比较模板'; $_LANG['template_files']['snatch'] = '夺宝奇兵'; $_LANG['template_files']['tag_cloud'] = '标签云模板'; $_LANG['template_files']['brand'] = '商品品牌页'; $_LANG['template_files']['auction_list'] = '拍卖活动列表'; $_LANG['template_files']['auction'] = '拍卖活动详情'; 修改 admin/includes/lib_template.php 增加     'record.dwt', /* 可以设置内容的模板 */ $template_files = array(     'index.dwt',     'record.dwt',     'article.dwt',     'article_cat.dwt',     'brand.dwt',     'catalog.dwt',     'category.dwt',     'user_clips.dwt',     'compare.dwt',     'gallery.dwt',     'goods.dwt',     'group_buy_goods.dwt',     'group_buy_flow.dwt',     'group_buy_list.dwt',     'user_passport.dwt',     'pick_out.dwt',     'receive.dwt',     'respond.dwt',     'search.dwt',     'flow.dwt',     'snatch.dwt',     'user.dwt',     'tag_cloud.dwt',     'user_transaction.dwt',     'style.css',     'auction_list.dwt',     'auction.dwt', ); 增加: 'record' => array(         '/library/ur_here.lbi' => 0,         '/library/search_form.lbi' => 0,         '/library/new_articles.lbi' => 0,         '/library/category_tree.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/order_query.lbi' => 0,         '/library/email_list.lbi' => 0,         '/library/vote_list.lbi' => 0     ),