<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-11

打开:inc_channel_unit_functions.php
加入下面一段


//zouql
//$f 列表总数
//$t 每组列表数
function MyList($f,$t,$meid,$con)
{
if($meid%$t ==0 && $meid < $f)
return $con;
}

使用举例:


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



上面例子中包含了2个用法:
[field:global name=autoindex function='MyList("20","2",@me,"class=\"color\"")'/]

[field:global name=autoindex function='MyList("20","5",@me,"<li class=\"line\"></li>")'/]

第一个,如果你定义了相关css,就是隔行变色
第二个,如果你定义了相关css,就是隔5行加一横线,20个列表加3个线不是4个,最后一个不加
想最后也加去掉 && $meid < $f 即可。
0
首页
案例
关于
联系