Weaving dream Dede CMS article List arclist tags Daquan

Source: Internet
Author: User

Tags introduction: Dream common tags, also known as free list tags, where imglist, Imginfolist, Specart, Coolart, and autolist are the alias tags that are extended by the different attributes defined by the tag.
Feature Description: Get a list of specified documents
Scope of application: global use
Basic syntax:
{dede:arclist flag= ' h ' typeid= ' row= "col=" titlelen= "infolen=" "imgwidth=" "imgheight=" "listtype=" key word= ' limit= ' 0,1 '}
<a href= ' [field:arcurl/] ' >[field:title/]</a>
{/dede:arclist}

typeid= ' column ID, in the list template and file template generally do not need to specify, in the homepage template allows the "," separate representation of multiple columns;
orderby= ' Sortrank ' document sorting method
§orderby= ' hot ' or orderby= ' click ' means by number of clicks
§orderby= ' Sortrank ' or orderby= ' pubdate ' sorted by publication time
§orderby= ' near '
§orderby== ' Lastpost ' by last review time
§orderby== ' scores ' ranked by score
§orderby= ' id ' sorted by article ID
§orderby= ' Rand ' randomly obtains a list of documents for the specified condition
Idlist = ' Extract specific document (document ID) call the specified ID document example idlist = ' 4,45,78,237 '
limit= ' Start ID, number of records ' (starting ID starting from 0) indicates a limited range of records (e.g. limit= ' 1 "means starting with a record with ID of 2
Keyword= ' A list of documents with the specified keywords, multiple keywords with ', ' points
orderway= ' desc ' value is DESC or ASC, specifying whether the sort is descending or a forward sort, the default is descending
Working with instances

{dede:arclist flag= "C" channelid= "row=" titlelen= ' ' orderby= '}
<li><a href= ' [Field:arcurl/] ' Title= "[Field:fulltitle/]" >[field:title/]</a></li>
{/dede:arclist}
row= ' 10 ' call 10, Titlelen = ' 60 ' title length 30 kanji flag= "C" recommended article orderby= "Default to sort by publication time
flag = ' C ' custom attribute value: Headline [h] recommended [c] picture [p] slide [f] scroll [s] jump [j] graphics [a] bold
call Latest posts sorted by publication time
{dede:arclist channelid= ' row= ' titlelen= ' <li><a ' [href=/] ' Field:arcurl ' [Field:fulltitle/] ">[field:title/]</a></li>
{/dede:arclist} row= ' 10 ' call 10, titlelen= ' 60 ' Title Length 30 Kanji
Sort Descending by ID, from large to small
{dede:arclist channelid= ' row= ' titlelen= ' orderby= ' id '}
<li><a Href= ' [field:arcurl/] ' title= "[Field:fulltitle/]" >[field:title/]</a></li>
{/dede:arclist} row= ' 10 ' calls 10, titlelen= ' 60 ' title length is 30 kanji orderby= ' ID ' by ID, descending order

Sort order by ID, small to large
{dede:arclist channelid= ' row= ' titlelen= ' orderby= ' id ' orderway= ' ASC '}
<li><a href= ' [field:arcurl/] ' title= ' [field:fulltitle/] ' >[field:title/]</a></li>
{/dede:arclist} row= ' 10 ' calls 10, titlelen= ' 60 ' title length is 30 kanji orderby= ' id ' by id,orderway= ' desc ' value of DESC or ASC, specifies whether sorting is descending or forward sort, Default is Descending

Call a document containing a thumbnail
{dede:arclist flag= "P" row= ' titlelen= ' 60 '}
<li><a href= "[Field:arcurl/]" > </a>
<span><a href= "[Field:arcurl/]" title= "[Field:fulltitle/]" >[field:title/]</a></span>
</li>
{/dede:arclist} flag = ' p ' custom attribute value: Headline [h] recommended [c] picture [p] slide [f] scroll [s] jump [j] graphic [a] bold

Various formats for dates
[Field:pubdate function=strftime ('%d ', @me)/]
08th [Field:pubdate function=strftime ('%d day ', @me)/]
06-08 [Field:pubdate function=strftime ('%m-%d ', @me)/]
June 08 [field:pubdate Function=strftime ('%m month%d ', @me)/]
09-06-08 [Field:pubdate function=strftime ('%y-%m-%d ', @me)/]
2009-06-08 [Field:pubdate function=strftime ('%y-%m-%d ', @me)/]
June 08, 09 [field:pubdate function=strftime ('%y%m month%d day ', @me)/]
June 08, 2009 [field:pubdate function=strftime ('%y%m month%d day ', @me)/]
2009-06-08 13:28 [field:pubdate function=strftime ('%y-%m-%d%h:%m ', @me)/]

Underlying field
ID of [field:id/] article, corresponding to Dede_archives ID field
[Field:typeid/] The ID of the column where the article is located
* [field:title/] article title (Control conditions include titlelen= ' bytes, background publishing document when the selected title color, bold)
* [field:fulltitle/] article title (title complete, no style)
* [Field:click/] Number of hits
[Field:shorttitle/] short title
* [Field:writer/] Author
* [Field:source/] Source
* [field:litpic/] thumbnail address same as [field:picname/]
[Field:picname/] thumbnail address same as [field:litpic/]
* [field:pubdate/] Release date
[Field:pubdate function=strftime ('%d ', @me)/]
08th [Field:pubdate function=strftime ('%d day ', @me)/]
06-08 [Field:pubdate function=strftime ('%m-%d ', @me)/]
June 08 [field:pubdate Function=strftime ('%m month%d ', @me)/]
09-06-08 [Field:pubdate function=strftime ('%y-%m-%d ', @me)/]
2009-06-08 [Field:pubdate function=strftime ('%y-%m-%d ', @me)/]
June 08, 09 [field:pubdate function=strftime ('%y%m month%d day ', @me)/]
June 08, 2009 [field:pubdate function=strftime ('%y%m month%d day ', @me)/]
2009-06-08 13:28[field:pubdate function=strftime ('%y-%m-%d%h:%m ', @me)/]
[Field:lastpost/] Last comment time usage same as [field:pubdate/]
[Field:scores/] Comment score
[Field:goodpost/] Praise
[field:badpost/] Bad reviews
* [field:description/] profile equivalent to [field:info/], [Field:infos/]
Word Count control [field:description function= "Cn_substr (@me, 120)"/] 60 kanji
Infolen= ' 160 ' indicates that the description length is equivalent to Infolength (control only infos, not control the contents of description)
* [Field:info/] profile equivalent to [field:description/], [Field:infos/]
Word Count control [field:info function= "Cn_substr (@me, 120)"/] 60 kanji
Infolen= ' 160 ' indicates that the description length is equivalent to Infolength (control only infos, not control the contents of description)
* [Field:infos/] profile equivalent to [field:info/], [field:description/]
Word Count control [Field:infos function= "Cn_substr (@me, 120)"/] 60 kanji
Infolen= ' 160 ' indicates that the description length is equivalent to Infolength (control only infos, not control the contents of description)
[Field:filename/] Article connection address equivalent to [field:arcurl/]
* [field:arcurl/] article link address equivalent to [field:filename/]
* [Field:textlink/] article title + address equivalent to <a href= ' [field:arcurl/] ' >[field:title/]</a>
* [field:litpic/] thumbnail address equivalent to [field:picname/]
* [field:picname/] thumbnail address equivalent to [field:litpic/]
* [Field:image/] equivalent to
Imgwidth= ' 120 ' thumbnail width
imgheight= ' 90 ' thumbnail height
* [Field:imglink/] equivalent to Imglink = <a href= ' [field:arcurl/] ' >[field:image/]</a>
* [Field:typename/] column title
* [Field:typeurl/] column address
* [Field:typelink/] equivalent to <a href= ' [field:typeurl/] ' >[field:typename/]</a>
[Field:plusurl/] Pius folder address equivalent to [Field:global name=plusurl/]
[Field:memberurl/] Member folder address equivalent to [Field:global name=memberurl/]
[Field:templeturl/] Template folder address equivalent to [Field:global Name=templeturl/]
* [Field:global name=autoindex/] The most commonly used underlying tags, generating sequential numbers 1,2,3,4,5,6,7 .....
CSS control can be made into a variety of style effects, such as interlaced color, the list to add 1-10 number of numbers, every few lines of line change and so on
In PHP collocation, can produce a variety of effects, for Dede one of the most important code

Related functions:
File \include\taglib\arclist.lib.php Line 7th
Function lib_arclist (& $ctag,& $REFOBJ)
Parameter description:
Col= ' How many columns are displayed (default is a single column), this property can be displayed in several ways in version 5.3
If col= ' 1 ' is displayed for multiple columns, the available DIV+CSS implementations
The following is an example of a multi-column implementation via DIV+CSS:
<style type=text/css>
Div{width:400px;float:left;}
</style>
{dede:arclist row= ' titlelen= ' orderby= ' pubdate ' idlist= ' col= ' 2 '}
[field:textlink/] ([Field:pubdate function=mydate (' m-d ', @me)/]) <br/>
{/dede:arclist}
When col>1 will be displayed using the original table multi-column method
row= ' 10 ' returns the total number of document lists
typeid= ' column ID, in the list template and file template generally do not need to specify, in the homepage template allows the "," separate representation of multiple columns;
Getall= ' 1 ' does not specify this attribute in the case, in the column page, the article page template, will not get to "," separate the sub-categories of multiple columns
Titlelen = ' 30 ' title length equivalent to Titlelength
Infolen= ' 160 ' indicates that the description length is equivalent to Infolength (control only infos, not control the contents of description)
Imgwidth= ' 120 ' thumbnail width
imgheight= ' 90 ' thumbnail height
Listtype= ' All ' column type image contains thumbnails commend recommended
orderby= ' Sortrank ' document sorting method
§orderby= ' hot ' or orderby= ' click ' means by number of clicks
§orderby= ' Sortrank ' or orderby= ' pubdate ' sorted by publication time
§orderby= ' near '
§orderby== ' Lastpost ' by last review time
§orderby== ' scores ' ranked by score
§orderby= ' id ' sorted by article ID
§orderby= ' Rand ' randomly obtains a list of documents for the specified condition
Keyword= ' A list of documents with the specified keywords, multiple keywords with ', ' points
innertext = ' Single record style
Aid= ' Specify Document ID
Idlist = ' Extract specific document (document ID)
Channelid Channel ID
limit= ' Start ID, number of records ' (starting ID starting from 0) indicates a limited range of records (e.g. limit= ' 1 "means starting with a record with ID of 2
Flag = ' h ' custom attribute value: Headline [h] recommended [c] picture [p] slide [f] scroll [s] jump [j] graphics [a] bold
Noflag = "with flag, but here is a representation that does not contain these attributes
orderway= ' desc ' value is DESC or ASC, specifying whether the sort is descending or a forward sort, the default is descending
Subday= ' Days ' indicates the number of days within which the document
Use Arclist to add a method to the table field:
To get additional table content, you must meet two criteria
1. Specify the Channelid property
2. Specify the field to get addfields= ' field 1, field '
Such as:
{dede:arclist addfields= ' filetype,language,softtype ' row= ' 8 ' channelid= ' 3 '}
[Field:textlink/]-[Field:softtype/]<br/>
{/dede:arclist}

Underlying template fields:
ID (same ID), Typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,
Source,litpic (with Picname), Pubdate,senddate,mid, Lastpost,scores,goodpost,badpost,notpost,
Description (with infos), filename, image, Imglink, Fulltitle, Textlink, Typelink,plusurl, Memberurl, Templeturl,
Stime (pubdate "0000-00-00" format)
which
Textlink = <a href= ' Arcurl ' >title</a>
Typelink = <a href= ' Typeurl ' >typename</a>
Imglink = <a href= ' arcurl ' ></a>
Image =
Field Call method: [field:varname/]
Such as:
{dede:arclist infolen= ' 100 '}
[field:textlink/]
<br>
[field:infos/]
<br>
{/dede:arclist}
Note: The field implementation in the underlying template is also a form of a dream marker, so it supports the use of PHP syntax, function extensions, and so on.
such as: Add (new) logo to the content posted on the same day
[Field:senddate runphp= ' yes ']
$ntime = time ();
$oneday = 3600 * 24;
if ($ntime-@me) < $oneday) @me = "<font color= ' Red ' > (new) </font>";
else @me = "";
[/field:senddate]

Weaving dream Dede CMS article List arclist tags Daquan

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.