: This article mainly introduces the links and names of parent columns called by Zhimeng. For more information about PHP tutorials, see. Open a 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 ";}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 limit 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 ";}Then you can call the parent and parent top columns in the template:
{dede:channel type='fatherlist'}[field:typename/]{/dede:channel}
{dede:channel type='topone'}[field:typename/]{/dede:channel}
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.
The above section describes the parent-level topic links and names of Zhimeng calls, including relevant content, and hopes to help those who are interested in PHP tutorials.