织梦标签channelartlist在栏目列表获取二级三级

网站建设 2022-07-27 08:13www.1681989.com免费网站
/clude/taglib/channelartlist.lib.php 找到 if ($typeid== 0 || $typeid== ) 改成 if ($typeid== reid ){ global $cfg_Cs;$tid = $refObj-TypeLk-TypeInfos[ id ]; if (!is_array($cfg_Cs)) require_once (DEDEDATA. /cache/c_catalog_base.c ); if (! isset ($cfg_ […]



/clude/taglib/channelartlist.lib.php 找到

if($typeid==0 || $typeid=='')

改成

if($typeid=='reid')
{
	global $cfg_Cs;
	$tid = $refObj->TypeLk->TypeInfos['id'];
	if(!is_array($cfg_Cs)) require_once(DEDEDATA."/cache/c_catalog_base.c");
	if(!isset($cfg_Cs[$tid][0]) || $cfg_Cs[$tid][0]==0) $id = $tid;
	else $id = GetTopid($cfg_Cs[$tid][0]);
	$tpsql = " reid='$id' AND ishidden<>1 ";
	$order = " ORDER BY sortrank ASC";
}
elseif($typeid==0 || $typeid=='')

列表页内容页模板调用标签

<ul>
{dede:channelartlist typeid=reid}
	<h2><a href="{dede:field.typeurl/}">{dede:field.typename/}</a></h2>
	{dede:channel type=son noself=yes}
	<li><a href="[field:typeurl/]">[field:typename/]</a></li>
	{/dede:channel}
{/dede:channelartlist}
</ul>


Copyright © 2016-2025 www.1681989.com 推火网 版权所有 Power by