欢迎来到润旭源码网
帮助中心

润旭源码网

热门搜索: 企业源码    免费源码   

织梦栏目列表页dede:list按flag属性调用文章方法

  • 时间:2020-07-14 09:41 编辑: 来源: 阅读:200
  • 扫一扫,手机访问
摘要:织梦栏目列表页dede:list按flag属性调用文章方法,跟着下面的教程来操作打开 include/arc.listview.class.php 找到,大概在45行var $remoteDir;在它下面加入一行var $Flag;继续找到$this->remoteDir = '';在它下面加入一行$this->Flag = ''; 继续找到,大概在227行 至 267行的全部//初

织梦栏目列表页dede:list按flag属性调用文章方法,跟着下面的教程来操作

打开 include/arc.listview.class.php 找到,大概在45行

var $remoteDir;

在它下面加入一行

var $Flag;

织梦栏目列表页dede:list按flag属性调用文章方法


继续找到


$this->remoteDir = '';


在它下面加入一行


$this->Flag = '';


 


继续找到,大概在227行 至 267行的全部


//初始化列表模板,并统计页面总数...

织梦栏目列表页dede:list按flag属性调用文章方法

把他们剪切放到,大概在155行的下面

$this->addSql  = " arc.arcrank > -1 ";

放它的下面来

如图

织梦栏目列表页dede:list按flag属性调用文章方法

继续找到

if($ctag->GetAtt("pagesize")!="")

在它上面加入

if($ctag->GetAtt("flag")!="") {$this->Flag = 1; $flags = explode(',', $ctag->GetAtt("flag"));for($i=0; isset($flags[$i]); $i++) $this->addSql .= " AND FIND_IN_SET('{$flags[$i]}', arc.flag)>0 "; }

织梦栏目列表页dede:list按flag属性调用文章方法

继续找到

$row = $this->dsql->GetOne($cquery);

在它上面加入

if($this->Flag != "") { $cquery = "SELECT COUNT(*) AS dd FROM `dede_archives` arc WHERE ".$this->addSql; }

织梦栏目列表页dede:list按flag属性调用文章方法

最后找到

if(preg_match('/hot|click|lastpost/', $orderby))

改成

if(preg_match('/hot|click|lastpost|weight/', $orderby) || $this->Flag != "")

织梦栏目列表页dede:list按flag属性调用文章方法

织梦栏目列表页flag标签的写法

{dede:list pagesize='10' titlelen='250' flag='c,p'}

{/dede:list}

flag='c,p'  支持一个属性和多个属性同时调用
 


  • 全部评论(0)
资讯详情页最新发布上方横幅
联系我们

QQ:888477 {点击直接联系}

邮箱:runxu123@qq.com

时间:周1——周6 【9:00-23:00

联系客服
购买源码 源码咨询 投诉建议 联系客服
0373-6621888
手机版

扫一扫进手机版
返回顶部