dedecms 5.7版本已增加按权重排序功能: [arclist]标签增加按权重排序,在后台管理DEDE里找到以下目录\include\taglib中的arclist.lib.php文件并打开 大约在74 .75行找到: // arclist是否需要weight排序,默认为”N”,如果需要排序则设置为”Y” $isweight = $ctag->GetAtt(‘isweight’); 从这里可以看出,新版本增加了一个布尔变量,直接在模板标签里加入isweight='Y'     即可! 首页中…
http://blog.csdn.net/langyu1021/article/details/52261411 关于首页.列表页调用文章body内容的两种方法,具体方法如下: 第一种方法: {dede:arclist row='1' typeid='1' addfields='body' idlist='1' channelid='1'} [field:body function='cn_substr(html2text(@me),100)'/] {/dede:arclist} 1 2 3 1…
根据全局变量$GLOBALS['_sys_globals']['curfile']的值来判断. 首页parview:列表页listview:文章页archives 应用示例: {dede:php}if($GLOBALS['_sys_globals']['curfile'] == 'list') {echo 'style="position:fixed"';}{/dede:php}…
[第一种方法] arclist标签使用如下: {dede:arclist row='1' typeid='1' addfields='body' idlist='1' channelid='1'} [field:body function='cn_substr(html2text(@me),100)'/] {/dede:arclist} 解析: 1.addrields=”字段1,字段2…” 2.idlist=”文章ID”(可不写) 3.channelid=”模型ID”,普通文章默认为1(查看方法…
在使用dede过程,有的朋友会调调出文章的列表的内容出来,怎么调呢?当然是用dede的传参的数据查询语句了,方法如下: {dede:arclist flag=h typeid=2 row=1 titlelen='200' orderby=pubdate} <div class="data-news"> <dl> <dt><a href="[field:arcurl/]" target="_blank"&g…
  dede频道页实现三级栏目嵌套调用文章: //支持arclist标签开始--> $typeid = $row['id']; if((class_exists('PartView'))) { $pv = new PartView($typeid); $text = $likeType; $text= str_replace(array('{field', '/}'), array('[field', '/]'), $text); $pv->SetTemplet($text,'string')…
首先呢,先在根目录 /plus 目录下找到count.php  复制一份然后命名为viewclick.php(你也可以命名为你容易理解的名字)用编辑器将viewclick.php打开然后删除以下几行代码(即插入数据库的这两行) if(!empty($maintable)) { $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET click=click+1 WHERE {$idtype}='$aid' "); } if(!empt…
一般情况下,在dede织梦系统中列表页.栏目页和文章页中获取当前所在栏目名称只需要代码:{dede:type}[field:typename]{/dede:type}即可,不需要定义ID,默认的就是当前栏目名称,这种方法同时也适用于多级分类.当然还有别的方式如下: 找到include/inc_functions.php(此函数为公共函数,当程序运行时自动加载) 在尾部添加新的函数如下: 复制代码 代码如下: //通过栏目ID获取栏目的名称 function GetTypeName($typeid…
/**DEDECMS首页和列表页调用单个图片集里的多张图片 function Getimg($aid,$imgwith=110,$imgheight=110,$num=0) { global $dsql; $imgurls = ''; $row =$dsql->getone( "Select aid,imgurls From `js_addonimages` where aid='$aid' "); $id=$row['aid']; $imgurls= $row['imgurls…
原文:http://www.wuaie.com/?p=66 源码改写 $typeid = $row['id']; if((class_exists('PartView'))) { $pv = new PartView($typeid); $text = $likeType; $text= str_replace(array('{field', '/}'), array('[field', '/]'), $text); $pv->SetTemplet($text,'string'); $artli…