dedecms模板显示副栏目文章的修改方法

在网站模板中很少有人会使用到副栏目,如果不是很大、很复杂的网站都不会使用到副栏目,所以在文章显示栏目的时候也不会显示副栏目,想要显示副栏目的文章还要做一些小的修改。
在修改的时候是按照织梦5.3的模板文件修改的,如果你使用的是更高的织梦模板版本,还要记得文件备份之后再进行修改:
打开/include/taglib/arclist.lib.php
找到以下代码(第211行左右):
if($CrossID==’’) o r w h e r e s [ ] = ′ a r c . t y p e i d i n ( ′ . G e t S o n I d s ( orwheres[] = ' arc.typeid in ('.GetSonIds( orwheres[]=arc.typeidin(.GetSonIds(typeid).’)’;
else o r w h e r e s [ ] = ′ a r c . t y p e i d i n ( ′ . G e t S o n I d s ( orwheres[] = ' arc.typeid in ('.GetSonIds( orwheres[]=arc.typeidin(.GetSonIds(typeid).’,’. C r o s s I D . ′ ) ′ ; 改 成 i f ( CrossID.')'; 改成 if( CrossID.);if(CrossID==’’) o r w h e r e s [ ] = ′ t y p e i d i n ( ′ . G e t S o n I d s ( orwheres[] = ' typeid in ('.GetSonIds( orwheres[]=typeidin(.GetSonIds(typeid).’) or typeid2 in (’.GetSonIds($typeid).’)’;
else o r w h e r e s [ ] = ′ t y p e i d i n ( ′ . G e t S o n I d s ( orwheres[] = ' typeid in ('.GetSonIds( orwheres[]=typeidin(.GetSonIds(typeid).’,’. C r o s s I D . ′ ) o r t y p e i d 2 i n ( ′ . G e t S o n I d s ( CrossID.') or typeid2 in ('.GetSonIds( CrossID.)ortypeid2in(.GetSonIds(typeid).’,’.$CrossID.’)’;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值