织梦导航不显示外部链接栏目,修改channelartlist标签方法
织梦导航不显示外部链接栏目,修改channelartlist标签方法
在文件 include/taglib/channelartlist.lib.php第67行左右,
查找:
<span style="font-size:14px;"><span style="font-family:tahoma,geneva,sans-serif;">1 $tpsql = " reid=0 AND ispart<>2 AND ishidden<>1 AND channeltype>0 ";
</span></span>
修改为:
<span style="font-size:14px;"><span style="font-family:tahoma,geneva,sans-serif;">1 $tpsql = " reid=0 AND ishidden<>1 AND channeltype>0 ";
</span></span>
即删除 AND ispart<>2
完成。
栏目为外部链接时默认使用新窗口打开,其它栏目使用当前窗口打开的修改方法。
查找:
<span style="font-size:14px;"><span style="font-family:tahoma,geneva,sans-serif;">1 $pv->Fields['typeurl'] = GetOneTypeUrlA($typeids[$i]);
</span></span>
在代码的下一行增加:
<span style="font-size:14px;"><span style="font-family:tahoma,geneva,sans-serif;">1 if($typeids[$i]['ispart'] == 2){
$pv->Fields['typeurl'] = $pv->Fields['typeurl'].'" target="_blank';
}
</span></span>
这样,在输出的链接后就自动增加了新窗口打开的代码了。 仅供大家参考学习哦~