织梦调用父级栏目链接和名称,DEDE技术
导读:DEDE技术DEDE技术打开文件 /include/taglib/channel.lib.php 找到代码 else if($type==self) { if($reid==0) redede模板堂dede网站模板。
打开文件 /include/taglib/channel.lib.php 织梦模板找到代码 else if($type=='self') { if($reid==0) return ''; $sql = "SELECT id,typename,typedir,isdede,模板default,ispart,defaultname,namerule2,moresite,siteurl,sitepath FROM `dede_arctype` WHERE reid='$reid' And ishidden<>1 order by sortrank asc limit 0, $line "; } 在其后添加 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,sitepath FROM `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,sitepath FROM `dede_arctype` WHERE reid='$reid' And idede下瓻模板下载shidden<>1 order by sortrank asc limit 0, $line "; } 然后就可以在模板中调用父级栏目和父级顶级栏目了: {dede:channel type='fatherlist'}[field:typename/]{/dede:channel} {dede:channel type='topone'}[field:typename/]{/dede:channel} 相关dede模板堂dede网站模板。
声明: 本文由我的SEOUC技术文章主页发布于:2023-07-18 ,文章织梦调用父级栏目链接和名称,DEDE技术主要讲述名称,栏目,织梦网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_29407.html