在arclist,list标签内调用顶级栏目,示例图片:
代码如下:
复制代码 代码如下:
[field:typeid runphp="yes"]
$ID = @me;
$sql = "SELECT * FROM `dede_arctype` WHERE id=$ID";
$query = mysql_query($sql);
$row=mysql_fetch_array($query);
$reID = "$row[reid]";
if($reID == 0)
{@me = $row[typename];}
else{$sql = "SELECT `typename` FROM `dede_arctype` WHERE id=$reID";
$query = mysql_query($sql);
$row=mysql_fetch_array($query);
@me = $row[typename];}
[/field:typeid]