您当前的位置: 主页 > 优化教程
标签名称:arclist
 
标记简介:织梦常用标记,也称为自由列表标记,其中imglist、imginfolist、specart、coolart、autolist都是由该标记所定义的不同属性延伸出来的别名标记。
功能说明:获取指定文档列表
适用范围:全局使用
基本语法:
{dede:arclist  flag='h' typeid='' row='' col='' titlelen='' infolen='' imgwidth='' imgheight='' listtype='' orderby='' keyword='' limit='0,1'}
<a href='[field:arcurl/]'>[field:title/]</a>
{/dede:arclist}
参数说明:
col='' 分多少列显示(默认为单列),5.3版中本属性可以通过多种方式进行多行显示
如果col='1'要多列显示的可用div+css实现
以下为通过div+css实现多列的示例:
<style type=text/css>
div{width:400px;float:left;}
</style>
{dede:arclist row='10' titlelen='24' orderby='pubdate' idlist='' col='2'}
•[field:textlink/]([field:pubdate function=MyDate('m-d',@me)/])<br/>
{/dede:arclist}
当col>1将使用原来的table多列方式显示
row='10' 返回文档列表总数
typeid='' 栏目ID,在列表模板和档案模板中一般不需要指定,在首页模板中允许用","分开表示多个栏目;
getall='1' 在没有指定这属性的情况下,在栏目页、文章页模板,不会获取以","分开的多个栏目的下级子类
titlelen = '30' 标题长度 等同于titlelength
infolen='160' 表示内容简介长度 等同于infolength
imgwidth='120' 缩略图宽度
imgheight='90' 缩略图高度
listtype='all' 栏目类型 image含有缩略图 commend推荐
orderby='sortrank' 文档排序方式
§ orderby='hot' 或 orderby='click' 表示按点击数排列
§ orderby='sortrank' 或 orderby='pubdate' 按出版时间排列
§ orderby='near'
§ orderby=='lastpost' 按最后评论时间
§ orderby=='scores' 按得分排序
§ orderby='id' 按文章ID排序
§ orderby='rand' 随机获得指定条件的文档列表
keyword='' 含有指定关键字的文档列表,多个关键字用","分
innertext = '' 单条记录样式
aid='' 指定文档ID
idlist ='' 提取特定文档(文档ID)
channelid 频道ID
limit='起始ID,记录数'  (起始ID从0开始)表示限定的记录范围(如:limit='1,2'  表示从ID为1的记录开始,取2条记录)
flag = 'h' 自定义属性值:头条[h]推荐[c]图片[p]幻灯[f]滚动[s]跳转[j]图文[a]加粗[b]
noflag = '' 同flag,但这里是表示不包含这些属性
orderway='desc' 值为 desc 或 asc ,指定排序方式是降序还是顺向排序,默认为降序
subday='天数' 表示在多少天以内的文档
 
用arclist调用于附加表字段的方法:
 
要获取附加表内容,必须符合两个条件
1、指定 channelid 属性
2、指定要获得的字段 addfields='字段1,字段'
如:
{dede:arclist addfields='filetype,language,softtype' row='8' channelid='3'}
[field:textlink /] - [field:softtype /]<br />
{/dede:arclist}
 
 
底层模板字段:
ID(同 id),typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,
source,litpic(同picname),pubdate,senddate,mid, lastpost,scores,goodpost,badpost,notpost,
description(同infos),filename, image, imglink, fulltitle, textlink, typelink,plusurl, memberurl, templeturl,
stime(pubdate 的"0000-00-00"格式)
其中:
textlink = <a href='arcurl'>title</a>
typelink = <a href='typeurl'>typename</a>
imglink = <a href='arcurl'><img src='picname' border='0' width='imgwidth' height='imgheight'></a>
image = <img src='picname' border='0' width='imgwidth' height='imgheight' alt=’titile’>
 
 
字段调用方法:[field:varname/]
如:
{dede:arclist infolen='100'}
[field:textlink/]
<br>
[field:infos/]
<br>
{/dede:arclist}
注:底层模板里的Field实现也是织梦标记的一种形式,因此支持使用PHP语法,Function扩展等功能。
 
 
如: 给当天发布的内容加上 (new) 标志
[field:senddate runphp='yes']
$ntime = time();
$oneday = 3600 * 24;
if(($ntime - @me)<$oneday) @me = "<font color='red'>(new)</font>";
else @me = "";
[/field:senddate]

 

关键词:dedecms,标签,arclist,文章,列表,调用,标签    标签:
    更多资讯请收藏关注 网站模板(www.1yc.cn)

Dedecms留言板留言后刷新会重复提交解决方法织梦CMS(dedecms)这款程序很好用,模板种类不仅多而且齐全,可... 2021-07-30
DedeCMS百度结构化数据插件常见404跳转、重复域名网址、路径等问最近刚使用织梦DedeCMS百度结构化数据插件,但是在使用中却遇到了4... 2021-08-09
织梦自定义字段为空时显示不同的内容有时候织梦自定义字段,如果没有值的时候要显示指定的默认内容,该如何操作... 2021-07-22
dedecms图片相对地址和绝对地址的问题如何将p align=leftimg alt= src=/upload... 2021-07-22
dedecms任意页面调用指定栏目内容的方法我们在使用dedecms 织梦模板 建站的时候,经常把内容写到栏目内容... 2021-07-22
dedecmsDedecms网站管理后台白屏解决办法织梦Dedecms网站管理后台白屏解决办法 。 1、 登录织梦Dede... 2021-08-09
dedecms5.7首页和列表页模板中动态调用文章浏览次数的方法本文实例讲述了dedecms5.7首页和列表页模板中动态调用文章浏览次... 2021-07-30
DEDECMS 如何让栏目外部链接在新窗口中打开近遇到一个问题,就是dedecms的导航,是用外部链接的,但是原窗口打... 2021-07-30
dedecms问题Cannot modify header information headers already昨天使用appsevr本地架设一个站,因为需要调试一个页面模板,因此改... 2021-07-27
织梦Dedecms系统实现按“字母检索”搜索功能织梦在做电影站时经常会用到按字母检索功能,很多人不能实现这个功能,所以... 2021-07-30
织梦标签channel实现列表页调用当前栏目的子类代码如下: {dede:channel type=son row=10... 2021-07-27
织梦dede首页列表页调用文章内容在使用dede的过程中,我们通常会调用文章内容在首页或者列表页面,官方... 2021-07-27
“关键字不能小于2个字节”解决办法织梦搜索老是显示关键词不能小于2个字节,这里哪里出现了问题了呢,于是在... 2021-07-27
织梦Dedecms上下篇文章标题字数截取方法对于dedecms的粉丝,想必对如何获取上一篇、下一篇文章的标签也是非... 2021-07-22
dedecms教程:增加栏目图片banner或栏目图片备注:这个对utf8编码有效,gbk需要转码! 首先给每个子栏目增加一... 2021-09-06
dedecms图集图片数量获取方法在include/common.func.php增加下列函数: fun... 2021-07-30
DedeCMS中function='Html2Text(@me)的用法分析本文实例讲述了DedeCMS中function=Html2Text(@... 2021-07-30
dedecmsdedecms相关专题的调用方法dedecms织梦相关专题的调用方法 。 在需要调用相关专题的地方添加... 2021-08-09

线
咨询热线:
135-0038-3336
在线客服:
点击这里给我发消息
微信交流:
公司官网: www.1yc.cn