首页 > 技术文章 > PHPCMS_v9 wap不同列表采用不同模板的方法

qhorse 2015-12-04 10:53 原文

1.在phpcms\modules\wap\index.php中搜索
$template = ($TYPE[$typeid]['parentid']==0 && in_array($typeid,array_unique($parentids))) ? $WAP_SETTING['category_template'] : $WAP_SETTING['list_template'];

修改为
$template = ($TYPE[$typeid]['parentid']==0 && in_array($typeid,array_unique($parentids))) ? $WAP_SETTING['category_template'] : $WAP_SETTING['list_template'].$typeid;
2.这样子的话,假定列表文件默认为list.html, 那typeid 为1的列表文件就是list1.html,typeid 为2的列表文件就是list2.html,这样子就可以不同列表采用不同模板显示。

 

推荐阅读