dedecms dede:arclist 怎么调用文章副栏目的名称,我是要文章副栏目的名称和该栏目的链接 10
2个回答
展开全部
内容页 -标签:
{dede:field.typeid2 runphp='yes'}
$dsql= new dedesql();
$ks = split(',', @me);
$type2name="";
foreach($ks as $k){
$k = trim($k);
if ($k!="") {
if ($row = $dsql->getOne("select *,ID as id1 from dede_arctype where id=".$k)){
$type_path=GetTypeUrl($row['id1'],MfTypedir($row['typedir']),$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['siteurl']);
$type2name.="<a href='".$type_path."' target=_blank>".$row['typename']."</a> ";
}
}
}
@me=substr($type2name,0,strlen($type2name)-1);
{/dede:field.typeid2}
首页 列表页 -标签 :
[field:typeid2 runphp='yes']
$dsql= new dedesql();
$ks = split(',', @me);
$type2name="";
foreach($ks as $k){
$k = trim($k);
if ($k!="") {
if ($row = $dsql->getOne("select *,ID as id1 from dede_arctype where id=".$k)){
$type_path=GetTypeUrl($row['id1'],MfTypedir($row['typedir']),$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['siteurl']);
$type2name.="<a href='".$type_path."' target=_blank>".$row['typename']."</a> ";
}
}
}
@me=substr($type2name,0,strlen($type2name)-1);
[/field:typeid2]
{dede:field.typeid2 runphp='yes'}
$dsql= new dedesql();
$ks = split(',', @me);
$type2name="";
foreach($ks as $k){
$k = trim($k);
if ($k!="") {
if ($row = $dsql->getOne("select *,ID as id1 from dede_arctype where id=".$k)){
$type_path=GetTypeUrl($row['id1'],MfTypedir($row['typedir']),$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['siteurl']);
$type2name.="<a href='".$type_path."' target=_blank>".$row['typename']."</a> ";
}
}
}
@me=substr($type2name,0,strlen($type2name)-1);
{/dede:field.typeid2}
首页 列表页 -标签 :
[field:typeid2 runphp='yes']
$dsql= new dedesql();
$ks = split(',', @me);
$type2name="";
foreach($ks as $k){
$k = trim($k);
if ($k!="") {
if ($row = $dsql->getOne("select *,ID as id1 from dede_arctype where id=".$k)){
$type_path=GetTypeUrl($row['id1'],MfTypedir($row['typedir']),$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['siteurl']);
$type2name.="<a href='".$type_path."' target=_blank>".$row['typename']."</a> ";
}
}
}
@me=substr($type2name,0,strlen($type2name)-1);
[/field:typeid2]
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询