百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>织梦CMS教程> 让dedecms支持notypeid的属性
分享文章到:

让dedecms支持notypeid的属性

发布时间:09/15 来源:未知 浏览: 关键词:
文章介绍

 打开/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'}

打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有153人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板