Fork me on github

PHPCMS_v9 wap不同列表采用不同模板的方法

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,这样子就可以不同列表采用不同模板显示。

 

posted @ 2015-12-04 10:53  Champion-水龙果  阅读(348)  评论(0编辑  收藏  举报
Champion-水龙果