Simple usage:
{dede:arclist typeid= "1" row="6"}<li class=" list[field:global.autoindex/]">[field:title function="cn_substr (@me, +) "/]</li>{/dede:arclist}
Output is similar to
<li class= "List1" >1</li>
<li class= "List2" >1</li>
<li class= "List3" >1</li>
<li class= "List4" >1</li>
<li class= "List5" >1</li>
<li class= "List6" >1</li>
Very useful
————————————————————————————————————————————————————————————————
————————————————————————————————————————————————————————————————
Advanced usage
{dede:arclist typeid= '1′limit= '0,Ten′titlelen= ' -* }<li><emclass= "Num[field:GlobalName=autoindex runphp="Yes"] (@me <4)? @me = "3″: @me = ""; [/field:global] ">[Field:GlobalName=autoindex runphp="Yes"] (@me <Ten)? @me = "0@me ": @me ="Ten″; [/field:Global]</em><a href= "[field:arcurl/]" target= "_blank" title= "[field:fulltitle/]" >[Field:title/]</a></li>{/dede:arclist}
//@me represents the value of this tag itself
//autoindex self-increment sequence number just want to be the general loop has the i++ loop in the statement automatically plus 1
//runphp= "yes" PHP program run
//EM Everybody knows it's an HTML tag <em> the rest of us know it.
The template is parsed and the foreground is displayed as
<li><em class= Num3″ >01</em><###</li>
<li><em class= "NUM3″>02</EM>##</LI>
<li ><em class= "NUM3″>03</EM>##</LI>
...
<li><em class= "num" >09</EM>##</LI>
<li><em class= "num" >10</em># #</li>
is displayed as 10 rows, and preceded by numbering, as for the color border on the ordinal I think you can use CSS or pictures are all possible!
Interprets the above statement, AUTOINDEX<4 returns the value of AutoIndex to 3 If AUTOINDEX<10 returns the value of AutoIndex to 0autoindex;
If you want to call the number is very regular, with [Field:global name=autoindex runphp= "yes"] @me; [/field:global] in the @me into equal or difference or a fixed value, then you can write @me= "@me" +1, others please try to @me= "@me +1 " is not right, so +1 will be considered a string!
Dedecms use [field:global.autoindex/] to implement a list of numeric ordinals is written here, the above case can only be used in the arclist tag, please note that the
Dedecms Loop List style