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.’)’;

猜你喜欢

转载自blog.csdn.net/a9490489/article/details/104174139