dedecms织梦列表页内容页栏目高亮和当前栏目调用二级三级栏目

2018-10-2220:01:26网站建设与开发Comments1,953 views字数 1275阅读模式

1、打开 \include\taglib\channelartlist.lib.php 找到文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/6934.html

$tpsql = " reid='$typeid' AND ispart<>2 AND ishidden<>1 ";
1
改成文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/6934.html

if($type=='son')
{
$typeid = ( !empty($refObj->TypeLink->TypeInfos['id']) ? GetTopid($refObj->TypeLink->TypeInfos['id']) : 0 );
$tpsql = " reid='$typeid' AND ishidden<>1 ";
}
else
{
$tpsql = " reid='$typeid' AND ispart<>2 AND ishidden<>1 ";
}
1
2
3
4
5
6
7
8
9
2、打开 \include\taglib\channel.lib.php 找到文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/6934.html

if($type=='son' && $reid!=0 && $totalRow==0)
1
改成文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/6934.html

if($type=='son' && $reid!=0 && $totalRow==0 && $noself=='')
1
3、后台-系统-其它选项 去掉php文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/6934.html

列表页和内容页 标签写法文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/6934.html

<ul>
{dede:php}
$GLOBALS['thisid'] = intval($refObj->Fields['typeid']);
$GLOBALS['reid'] = intval($refObj->Fields['reid']);
$GLOBALS['topid'] = intval($refObj->Fields['topid']);
{/dede:php}
{dede:channelartlist type=son}
<li{dede:field.typeid runphp=yes}(@me==$GLOBALS['thisid']||@me==$GLOBALS['reid']||@me==$GLOBALS['topid'])? @me=' class="current"':@me='';{/dede:field.typeid}><a href='{dede:field.typeurl/}' >{dede:field.typename/}</a></li>
<ul>
{dede:channel type=son noself=yes}
<li[field:id runphp=yes](@me==$GLOBALS['thisid'])? @me=' class="current2"':@me='';[/field:id]><a href='[field:typelink /]' title='[field:typename/]'>[field:typename/]</a></li>
{/dede:channel}
</ul>
{/dede:channelartlist}
</ul>
---------------------
作者:火狼网络工作室
来源:CSDN
原文:https://blog.csdn.net/hlplan/article/details/77769647
版权声明:本文为博主原创文章,转载请附上博文链接!文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/6934.html

  • 本站内容整理自互联网,仅提供信息存储空间服务,以方便学习之用。如对文章、图片、字体等版权有疑问,请在下方留言,管理员看到后,将第一时间进行处理。
  • 转载请务必保留本文链接:https://www.cainiaoxueyuan.com/cms/6934.html

Comment

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定