dede查询列表中单独显示查到了多少条记录

2021年3月15日11:49:26 发表评论
广告也精彩

查询列表中需要在醒目的地方单独显示查到了多少条记录。无奈dede没有提供,只有自动动手搞。

解决:

1.找到include/arc.searchview.class.php文件,找到Display()函数,添加如下判断

代码如下:

  1. else if($tagname=="totalcount")
  2. {
  3. $this->dtp->Assign($tagid,$this->GetTotalResult());
  4. }

2.外部添加GetTotalResult()函数,函数如下:

代码如下:

  1. function GetTotalResult()
  2. {
  3. return $this->TotalResult;
  4. }

3.模板也调用:

代码如下:

  1. {dede:totalcount/}
  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin
ts小陈

发表评论(请规范评论)--评论需审核

:?: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :cry: :mrgreen: :neutral: :razz:

已登录用户不需要填写以下内容