Home > CMS Tutorial > DEDECMS > Is the arclist tag of Dreamweaver CMS commonly used?

Is the arclist tag of Dreamweaver CMS commonly used?

(*-*)浩
Release: 2019-11-26 14:40:29
Original
2426 people have browsed it

Is the arclist tag of Dreamweaver CMS commonly used?

Tag name: arclist

Tag introduction: Commonly used tags for dream weaving, also known as free lists tag, among which imglist, imginfolist, specart, coolart, and autolist are all alias tags extended by different attributes defined by the tag. [Recommended learning: dedecms video tutorial]

Function description: Get the specified document list

Applicable scope: global use

Basic syntax:

{dede:arclist  flag='h' typeid='' row='' col='' titlelen='' infolen='' imgwidth='' imgheight='' listtype='' orderby='' keyword='' limit='0,1'}
<a href=&#39;[field:arcurl/]&#39;>[field:title/]</a>
{/dede:arclist}
Copy after login

Parameter description:

col='' Display in multiple columns (default is single column). In version 5.3, this attribute can be displayed in multiple columns. A way to display multiple rows

If col='1' wants to display multiple columns, you can use div css to implement it

The following is an example of how to implement multiple columns through div css:

<style type=text/css>
div{width:400px;float:left;}
</style>
{dede:arclist row=&#39;10&#39; titlelen=&#39;24&#39; orderby=&#39;pubdate&#39; idlist=&#39;&#39; col=&#39;2&#39;}
?[field:textlink/]([field:pubdate function=MyDate(&#39;m-d&#39;,@me)/])<br/>
{/dede:arclist}
Copy after login

When col>1 will be displayed using the original table multi-column mode

row=&#39;10&#39; 返回文档列表总数
typeid=&#39;&#39; 栏目ID,在列表模板和档案模板中一般不需要指定,在首页模板中允许用","分开表示多个栏目;
getall=&#39;1&#39; 在没有指定这属性的情况下,在栏目页、文章页模板,不会获取以","分开的多个栏目的下级子类
titlelen = &#39;30&#39; 标题长度 等同于titlelength
infolen=&#39;160&#39; 表示内容简介长度 等同于infolength
imgwidth=&#39;120&#39; 缩略图宽度
imgheight=&#39;90&#39; 缩略图高度
listtype=&#39;all&#39; 栏目类型 image含有缩略图 commend推荐
orderby=&#39;sortrank&#39; 文档排序方式
§ orderby=&#39;hot&#39; 或 orderby=&#39;click&#39; 表示按点击数排列
§ orderby=&#39;sortrank&#39; 或 orderby=&#39;pubdate&#39; 按出版时间排列
§ orderby=&#39;near&#39;
§ orderby==&#39;lastpost&#39; 按最后评论时间
§ orderby==&#39;scores&#39; 按得分排序
§ orderby=&#39;id&#39; 按文章ID排序
§ orderby=&#39;rand&#39; 随机获得指定条件的文档列表
keyword=&#39;&#39; 含有指定关键字的文档列表,多个关键字用","分
innertext = &#39;&#39; 单条记录样式
aid=&#39;&#39; 指定文档ID
idlist =&#39;&#39; 提取特定文档(文档ID)
channelid 频道ID
limit=&#39;起始ID,记录数&#39;  (起始ID从0开始)表示限定的记录范围(如:limit=&#39;1,2&#39;  表示从ID为1的记录开始,取2条记录)
flag = &#39;h&#39; 自定义属性值:头条[h]推荐[c]图片[p]幻灯[f]滚动[s]跳转[j]图文[a]加粗[b]
noflag = &#39;&#39; 同flag,但这里是表示不包含这些属性
orderway=&#39;desc&#39; 值为 desc 或 asc ,指定排序方式是降序还是顺向排序,默认为降序
subday=&#39;天数&#39; 表示在多少天以内的文档
Copy after login

Use arclist to call the method of additional table fields:

To obtain additional table content, two conditions must be met

1. Specify the channelid attribute

2. Specify the fields to be obtained addfields='field 1,field'

For example:

{dede:arclist addfields=&#39;filetype,language,softtype&#39; row=&#39;8&#39; channelid=&#39;3&#39;}
[field:textlink /] - [field:softtype /]<br />
{/dede:arclist}
Copy after login

Underlying template fields:

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"格式)
Copy after login

Among them:

textlink = <a href=&#39;arcurl&#39;>title</a>
typelink = <a href=&#39;typeurl&#39;>typename</a>
imglink = <a href=&#39;arcurl&#39;><img src=&#39;picname&#39; border=&#39;0&#39; width=&#39;imgwidth&#39; height=&#39;imgheight&#39;></a>
image = <img src=&#39;picname&#39; border=&#39;0&#39; width=&#39;imgwidth&#39; height=&#39;imgheight&#39; alt=’titile’>
Copy after login

Field calling method: [field:varname/]

For example:

{dede:arclist infolen=&#39;100&#39;}
[field:textlink/]
<br>
[field:infos/]
<br>
{/dede:arclist}
Copy after login

Note: The Field implementation in the underlying template is also a form of Dreamweaver tag, so Supports the use of PHP syntax, Function extension and other functions.

For example: Add the (new) mark to the content released on the day

[field:senddate runphp=&#39;yes&#39;]
$ntime = time();
$oneday = 3600 * 24;
if(($ntime - @me)<$oneday) @me = "<font color=&#39;red&#39;>(new)</font>";
else @me = "";
[/field:senddate]
[b][/b]
Copy after login

For more knowledge about Dreamweaver cms, please visit the Dreamweaver cms column! !

The above is the detailed content of Is the arclist tag of Dreamweaver CMS commonly used?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template