<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

DEDECMS用函数实现隔行换色以及分组加线

时间:2020-12-09

一句代码实现隔行换色以及分组加线,方法如下:

1.打开include/common.func.php,在最后边加入

1 //$f 列表总数
2 //$t 每组列表数
3 function MyList($f,$t,$meid,$con)
4 {
5 if($meid%$t ==0 && $meid < $f)
6 return $con;
7 }

2.调用的时候使用[field:global name=autoindex ]实现,例子如下

1 {dede:arclist row=20 titlelen=80 orderby=pubdate}
2 <li [field:global name=autoindex function='MyList("20","2",@me,"class=\"color\"")'/]>[field:textlink/]</li>
3 [field:global name=autoindex function='MyList("20","5",@me,"<li class=\"line\"></li>")'/]
4 {/dede:arclist}

说明:
 

1
0