演示链接:查看演示

dedecms导航不显示外部链接栏目,修改channelartlist标签方法

在文件 include/taglib/channelartlist.lib.php第67行左右,

 

查找:

<span style="font-size:14px;"><span style="font-family:tahoma,geneva,sans-serif;">$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;">$tpsql = " reid=0 AND ishidden<>1 AND channeltype>0 ";</span></span>

即删除 AND ispart<>2 AND

 

完成。

 

栏目为外部链接时默认使用新窗口打开,其它栏目使用当前窗口打开的修改方法。

 

查找:

<span style="font-size:14px;"><span style="font-family:tahoma,geneva,sans-serif;">$pv->Fields['typeurl'] = GetOneTypeUrlA($typeids[$i]);</span></span>

在代码的下一行增加:

<span style="font-size:14px;"><span style="font-family:tahoma,geneva,sans-serif;">if($typeids[$i]['ispart'] == 2){$pv->Fields['typeurl'] = $pv->Fields['typeurl'].'" target="_blank';}</span></span>

这样,在输出的链接后就自动增加了新窗口打开的代码了。 

 

THE END
喜欢就支持一下吧
点赞0 分享