Dede Tags: arclist label use Daquan

Source: Internet
Author: User

Special Note: Arclist is the most important label in the system of weaving dream building, but also the most basic label, I hope we can master it, it is necessary knowledge to learn weaving dream.

tag name : arclist
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= ' http://blog.163.com/[email protected]/blog/[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", "separate representation of multiple columns;

ORDER by = ' 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 from 0) indicates a limited range of records (for example: limit= ' + ' means starting from the record with ID 1, taking 2 records)
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
Invoke Recommended Articles

 {dede:arclist Flag= "C" channelid= ' row= ' titlelen= ' orderby= '}
             <li><a href= ' http://blog.163.com/[email protected]/blog/[field:arcurl/] ' title= ' [field : Fulltitle/] ">[field:title/]</a></li>
         {/dede : arclist}  
     row= ' 10 ' call 10,  titlelen= ' 60 ' Title length is 30 kanji   flag= "C" recommended article orderby= "Default to sort by publish time
     flag = ' C ' custom attribute value: Headline [h]  recommended [c]  picture [p]  slide [f]  Scroll [s]  jump [j]  text [a]  bold
strong>
Call the latest article sort by publication time

  {dede:arclist  channelid= "row= ' titlelen= '
             <li><a href= ' Http://blog.163.com/[email  protected]/blog/[field:arcurl/] ' title= "[Field:fulltitle/]" >[field:title/]</a></li>
         {/dede:arclist}         row= ' 10 ' call 10,  titlelen= ' 60 ' title length is 30 kanji    
  Sort by ID in descending order, from large to small

{dede:arclist channelid= ' row= ' titlelen= ' orderby= ' id ' }
<li><a href= ' http://blog.163.com/[email protected]/blog/[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= ' http://blog.163.com/[email protected]/blog/[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 is DESC or ASC, specifies whether the sort order is descending or a forward sort, the default is descending Order


Call a document containing a thumbnail

  {dede:arclist flag= "P" row= ' titlelen= '}
  & nbsp;         <li><a href= "http://blog.163.com/[email  Protected]/blog/[field:arcurl/] "></A>
             <span><a href= "Http://blog.163.com/[email protected]/blog/[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]  Text [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

[Field:id/] The ID of the article, corresponding to the ID field of the dede_archives
[Field:typeid/] ID of the column where the article is located
* [field:title/] Article title (Control conditions include titlelen= ' bytes, the title color selected when the document is published in the background, bold )
* [field:fulltitle/] Article title (title complete, no style)
* [Field:click/] Number of clicks
[Field:shorttitle/] Short title
* [Field:writer/] Author
* [Field:source/] Source
* [Field:litpic/] The thumbnail address is the same as [Field:picname/]
[Field:picname/] The thumbnail address is the 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 review time usage same as [field:pubdate/]
[Field:scores/] Comment Score
[Field:goodpost/] Praise
[field:badpost/] Poor 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 infos only, 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 content profile length is equivalent to Infolength (control infos only, 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 infos only, 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= ' http://blog.163.com/[email protected]/blog/[field:arcurl/] ' >[field:title/]</a>
* [Field:litpic/] The thumbnail address is equivalent to [field:picname/]
* [Field:picname/] The thumbnail address is equivalent to [field:litpic/]
* [Field:image/] Equivalent to
imgwidth= ' 120 ' thumbnail width
imgheight= ' 90 ' thumbnail height
* [Field:imglink/] Equivalent to Imglink = <a href= ' http://blog.163.com/[email protected]/blog/[field:arcurl/] ' >[field:image/]</a>
* [Field:typename/] Column title
* [Field:typeurl/] Column Address
* [Field:typelink/] Equivalent to <a href= ' http://blog.163.com/[email protected]/blog/[field:typeurl/] ' >[field:typename/]</a>
[Field:plusurl/] Pius folder address is equivalent to [Field:global name=plusurl/]
[Field:memberurl/] The Member folder address is 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, generate 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 profile template generally do not need to specify, in the homepage template allows", "separate representation of multiple columns;
GetAll= ' 1 ' in the case of not specifying this attribute, 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(only control infos, do not control the contents of description)
ImgWidth= ' 120 ' thumbnail width
ImgHeight= ' 90 ' thumbnail height
ListType= ' All ' column type image contains thumbnails commend recommended
by= ' Sortrank ' Document Sort 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 keyword, with ', ' points for multiple keywords
innertext= ' Single record style '
Aid= ' ' Specify Document ID
idlist= ' Extract specific document (document ID)
ChannelidChannel ID
Limit= ' Start ID, number of records ' (starting ID starting from 0) indicates a limited range of records (e.g. limit= ' + ' means starting from the record with ID 1, taking 2 records)
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= ' http://blog.163.com/[email protected]/blog/arcurl ' >title</a>
Typelink = <a href= ' http://blog.163.com/[email protected]/blog/typeurl ' >typename</a>
Imglink = <a href= ' http://blog.163.com/[email protected]/blog/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: to the day of the content of the release plus(new)Sign
[Field:senddate runphp= ' yes ']
$ntime = time ();
$oneday = 3600 * 24;
if ($ntime-@me) < $oneday) @me = "<font color= ' Red ' > (new) </font>";
else @me = "";
[/field:senddate]

This article is from the "11095217" blog, please be sure to keep this source http://11105217.blog.51cto.com/11095217/1736930

Dede Tags: arclist label use 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.