Open File
/include/taglib/channel.lib.php
Find Code
else if ($type = = ' self ') { if ($reid ==0) return '; $sql = "Select Id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath from ' #@__ Arctype ' WHERE reid= ' $reid ' and ishidden<>1 ORDER by Sortrank ASC limit 0, $line ";}
After you add
else if ($type = = ' Topone ') {if ($reid ==0) return '; $rowR = $dsql->getone ("select * from ' dede_arctype ' WHERE id= ' $ typeID ' "); $topids = $rowR [' topid ']; $sql =" Select Id,typename,typedir,isdefault,ispart,defaultname,namerule2, Moresite,siteurl,sitepathfrom ' Dede_arctype ' WHERE reid= ' 0 ' and id= ' $topids ' and ishidden<>1 ORDER by Sortrank ASC L Imit 0, $line ";} else if ($type = = ' Fatherlist ') {$rowR = $dsql->getone ("select * from ' dede_arctype ' WHERE id= ' $typeid '"); $reid = $rowR [' Reid ']; $rowR = $dsql->getone ("select * from ' dede_arctype ' WHERE id= ' $reid '"); $reid = $rowR [' Reid ']; $sql = "SELECT ID, Typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepathfrom ' Dede_arctype ' WHERE reid= ' $reid ' and ishidden<>1 ORDER by Sortrank ASC limit 0, $line ";}
You can then call the parent column and the parent top-level column in the template:
{dede:channel type= ' fatherlist '} [field:typename/] {/dede:channel}
{dede:channel type= ' topone '} [field:typename/] {/dede:channel}
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The above describes the dream Call parent column link and name, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.