效果演示:
(此图片来源于网络,如有侵权,请联系删除! )
实现教程
1、打开 includetaglibchannelartlist.lib.php 找到
1
|
$tpsql = " reid='$typeid' AND ispart<>2 AND ishidden<>1 ";
|
改成
1
2
3
4
5
6
7
8
9
|
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 ";
}
|
2、打开 includetaglibchannel.lib.php 找到
1
|
if($type=='son' && $reid!=0 && $totalRow==0)
|
改成
1
|
if($type=='son' && $reid!=0 && $totalRow==0 && $noself=='')
|
3、后台-系统-其它选项 去掉php
(此图片来源于网络,如有侵权,请联系删除! )
列表页和内容页标签写法
<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='':@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='':@me='';[/field:id]><a href='[field:typelink /]' title='[field:typename/]'>[field:typename/]</a></li>
{/dede:channel}
</ul>
{/dede:channelartlist}
</ul>
注意:红色的地方是必须要的
暂无评论内容