最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
织梦DEDECMS的dede:channelartlist语句排除指定typeid(可行)
时间:2022-06-25 19:23:36 编辑:袖梨 来源:一聚教程网
首先找到 includetaglibchannelartlist.lib.php,出于安全考虑先备份这个文件。打开channelartlist.lib.php 查找 $attlist
将
$attlist = 'typeid|0,row|20,cacheid|';
修改为:
$attlist = 'typeid|0,row|20,cacheid|,notypeid|0'; // 此处添加了一个所要排除typeid的参数—notypeid
再查找:
$dsql->SetQuery("Select id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath from `#@__arctype` where $tpsql order by sortrank asc limit $totalnum");
在其前面添加(注意是在前面添加):
//否定指定ID if($notypeid!=0) { $tpsql = $tpsql."and not(id in($notypeid)) "; }
保存文件后,再模板调用时:
{dede:channelartlist typeid ='7' notypeid='8'}
其中notypeid=’8′ 中的 8 为 7 的子栏目即生效。
相关文章
- 银与绯吉尔兰技能怎么样 吉尔兰战斗特性解析 07-14
- 异环异象管理局局长是谁 艾尔菲德角色详细介绍 07-14
- 欧意易ok官网下载版 欧意易app下载 07-14
- 迷你世界马车怎么做 马车制作方法介绍 07-14
- 碳碳岛许愿池有什么作用 许愿池建造方法介绍 07-14
- 最终幻想14水晶世界怎么招募雇员 招募雇员方法介绍 07-14