首页 > 网站 > 建站经验 > 正文

dede 列表调用副栏目的标题,可调用多个

2024-04-25 20:31:59
字体:
来源:转载
供稿:网友

[field:typeid2 runphp='yes']

global $dsql;

if(strstr(@me, ',')){

$typeid2s = explode(',', @me);

$typename2 = '';

foreach($typeid2s as $tid){

$sql = GetSonIds($tid);

$row = $dsql->GetOne("select * from dede_arctype where id=$tid");

$row['typeurl'] = GetTypeUrl($row['typeid'],$row['typedir'],$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']);

$typename2 .= '<li><a href="'.$row['typeurl'].'">'.$row['typename'].'</a></li>';

}

}else{

$row = $dsql->GetOne("select * from dede_arctype where id=@me");

$row['typeurl'] = GetTypeUrl($row['typeid'],$row['typedir'],$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']);

$typename2 = '<li><a href="'.$row['typeurl'].'">'.$row['typename'].'</a></li>';

}

@me = $typename2;

[/field:typeid2]

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表