广州凡科互联网科技有限公司

营业时间
MON-SAT 9:00-18:00

全国服务热线
18720358503

公司门店地址
广州市海珠区工业大道北67号凤凰创意园

织梦cmsdedecms子频道获得顶尖频道名字方式小结

日期:2021-03-02 浏览:
{dede:field.typeid runphp= yes }$ID = @me; 
$sql = SELECT * FROM `dede_arctype` WHERE id=$ID 
$query = mysql_query($sql);$row=mysql_fetch_array($query); 
$relID = $row[reid] if($relID == 0) {@me = $row[typename];}
else{$sql = SELECT `typename` FROM `dede_arctype` WHERE id=$relID 
$query = mysql_query($sql);$row=mysql_fetch_array($query); 
@me = $row[typename];}{/dede:field.typeid}

{dede:field.title runphp= yes }
list($toptype,$sontype)=split( / ,@me);@me=$toptype;
{/dede:field.title}

{dede:field.typeid runphp= yes }
$ID = @me; $sql = SELECT * FROM `dede_arctype` WHERE id=$ID 
$query = mysql_query($sql);$row=mysql_fetch_array($query); 
$relID = $row[reid] $topID= $row[topid] 
if($relID == 0) {@me = $row[typename];}
else{$sql = SELECT `typename` FROM `dede_arctype` WHERE id=$topID 
$query = mysql_query($sql);$row=mysql_fetch_array($query); 
@me = $row[typename];}{/dede:field.typeid}

global $dsql; $ = $dsql- GetOne( SELECT * FROM `dede_arctype` WHERE id= {$id} if($[ reid ]==0) return $[ typename else return getTopChannelName($[ reid }
以内容页那么应用:{dede:field name= typeid function= getTopChannelName(@me) /}
附加获得顶尖频道的url:
开启include/helpers/extend.helper.php,加上一个涵数:

global $dsql; $ = $dsql- GetOne( SELECT * FROM `dede_arctype` WHERE id= {$id} if($[ reid ]==0) return GetOneTypeUrlA($); else return getTopChannelUrl($[ reid }


网站知识

联系方式丨CONTACT

  • 全国热线:18720358503
  • 传真热线:18720358503
  • Q Q咨询:2639601583
  • 企业邮箱:2639601583@qq.com

首页
电话
短信
联系