DedeCMS调用父栏目

{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_q
uery($sql);$row=mysql_fetch_array($query); @me = $row[typename];}{/dede:field.typeid}

发表评论

邮箱地址不会被公开。 必填项已用*标注