Using interlaced color change in the article list can make the two displayed contents different. Many websites use the interlaced color display method in the list page. I will explain it below. The code that implements interlaced color changing in dedecms v5.7 is posted here, so that friends who like dedecms can refer to the following code and modify it to achieve the display effect you want.
Add a line every 5 lines in the list: (Recommended learning: 梦Weavercms)
{dede:list pagesize='50'} <LI><a href="[field:arcurl /]" title="[field:title function='htmlspecialchars(@me)'/]" target=_blank>[field:title function="cn_substr(@me,48)"/]</a>[field:pubdate runphp='yes'] $a="<font color=red>".strftime('%m-%d',@me)."</font>"; $b=strftime('%m-%d',@me); $ntime = time(); $day3 = 3600 * 24; if(($ntime - @me) < $day3) @me = $a; else @me =$b; [/field:pubdate]<br> [field:global name=autoindex runphp="yes"] if(@me%5==0)@me="<hr />"; else @me=""; [/field:global] {/dede:list} <DIV></DIV></LI>
The above is the detailed content of Dream Weaver dedecms article list 'interlaced color change' effect. For more information, please follow other related articles on the PHP Chinese website!