您现在的位置是:首页 > 教程 > dedecms教程dedecms教程
实现让dedecms支持notypeid的属性方法
灵雁2023-09-24 21:18:47dedecms教程已有人查阅
导读打开/include/taglib/arclist.lib.php文件,找这段代码(大概在130行):return lib_arclistDone($re
打开/include/taglib/arclist.lib.php文件,找这段代码(大概在130行):
使用方法:
return lib_arclistDone
(
$refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen,
$ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby,
$ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid,
$ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'),
$tagid,$pagesize,$isweight
);
在之后括号之后加上(注意前面的逗号):
,$ctag->GetAtt('notypeid')
然后再找到这一段代码(大概在168行):
function lib_arclistDone(&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160,
$imgwidth=120, $imgheight=90, $listtype='all', $orderby='default', $keyword='',
$innertext='', $arcid=0, $idlist='', $channelid=0, $limit='', $att='', $order='desc', $subday=0, $noflag='',$tagid='', $pagesize=0, $isweight='N')
在括号的之后加上(注意前面的逗号):
,$notypeid=0
之后再找到这一句:
$orwheres[] = ' arc.arcrank > -1 ';
在其前面增加以下代码:
if(!empty($notypeid))
{
$orwheres[] = " and arc.typeid NOT IN (".GetSonIds($notypeid).")";
}
这样,代码就修改完毕了。保存之后就在arclist标签里试试看notypeid属性吧。对于网站栏目多,内容显示时又错综复杂的情况,这样的属性还是蛮实用的。使用方法:
{dede:arclist row=6 orderby=pubdate type='image.' imgwidth='108' imgheight='150' channelid='1' notypeid='1'}
本文标签:
很赞哦! ()
相关文章
- dedecms织梦错误(PHP 5.3 and above) Please set 'request_order'
- dedecms文章列表页添加缩略图的实现方法
- dedecms织梦如何调用Discuz论坛主题等数据
- dedecms织梦限制栏目列表生成的最大页数的方法
- 织梦dedecms添加RSS订阅功能的代码实例
- dedecms织梦在首页或列表页调用整篇文章内容的方法
- 织梦dedecms系统的安装方法步骤教程
- 织梦dedecms给栏目加一个英文栏目名字段的实现方法
- dedecms织梦验证码的代码注释介绍
- 织梦dedecms如何让文章列表实现隔行换色的代码实例
- dedecms织梦tag彩色关键字彩色标签修改方法
- dedecms织梦网页调用指定栏目信息的实现方法
随机图文
-
dedecms系统参数设置手册会员设置教程
本篇主要是织梦模板 V5.3系统参数设置手册之会员设置相关内容。是否开启会员功能(cfg_mb_open):系统会员功能是否开启,系统默认是开启的 -
dede织梦cms系统中添加自定义标签方法function教学
在织梦的标签中有时候会用到一些系统写好的工具方法,例如GetDateTimeMK(@me)格式化时间和cn_substr(@me,50)截取字符串等等 -
dede织梦cms栏目页面转换为单独页面
本文使用的是dedecms的版本是5.5,模板是默认的default模板。dedecms的栏目管理功能是很强大的,在一些企业网站中,需要“企业简介” -
织梦dede读者鼠标移到标题显示完整标题
大家在调用文档标题时会根据模板中板块的大小设置标题的长度,也就是titlelen=‘’这个参数了,有时我们的标题过长,只会在模板中显示标题的部分
留言与评论 (共有 条评论) |