Columns under column entry need different colors , We use automatic numbering here , Each number defines a different color .

Let's first look at the use of automatic numbering :
1, brief introduction
AutoNumber properties (autoindex and itemindex): An auto increment number in a list loop , Default from 0 start . stay dedecms The following three tags contain this property .

       arclist Use under label [field:global.autoindex/] 
       channel Use under label [field:global.autoindex/] 
       channelartlist Use under label {dede:global.itemindex/} 

2, application
Use AutoNumber attribute , Many functions can be realized , as : every other n Line break , Functions such as color change .

Example 1: Wrap three records per output .
{dede:channel type='son' typeid="1"} <A
href="[field:typelink/]">[field:typename/]</A> [field:global name="autoindex"
runphp="yes"] @me = @me+1; if(@me%3==0){ @me = "<br />"; }else{ @me = ""; }
[/field:global] {/dede:channel}
3, Change the default initial value of the AutoNumber property

in use @me Before judgment , implement @me = @me+n

n For the initial value you want to change , As above “ Wrap three records per output ” Example of .

<>4, Add AutoNumber attribute to other labels
I will summarize later dedecms Principles and methods of adding attributes to tags , Take this as an example , Not here .

First, add the column entry and its submenu to the column management of the website :

Then write the following code in the foreground , Define its color :

<div class="index_sum2 bg" style="margin-top:20px;"> <h3> Column entry </h3> <ul
class="index_sum2_ul2"> {dede:channel typeid="51" type="son"} <li
class="li[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global]">
<a href="[field:typelink/]" title="" οnclick="_addDynClicks("wburl",
1422732669, 42052)">[field:typename/]</a> </li> {/dede:channel} </ul> </div>
Please leave a message if you have any questions or add , Looking forward to learning with you , Common progress !

Technology
©2019-2020 Toolsou All rights reserved,
Unity Scene loading asynchronously ( Implementation of loading interface )ESP8266/ESP32 System : Optimize system startup time vue Of v-if And v-show The difference between JS How to operate college examination for the self-taught An overview of Marxism Faster RCNN Explanation of series algorithm principle ( note )CSS architecture design NOI2019 travels IAR Installation and use tutorial sort ( one ) bubble sort