添加循环下标添加
{dede:channel type=‘top‘ row=‘9‘ line=‘2‘} //line=‘2‘是指从2开始递增
<a href="[field:typeurl/]" title="[field:typename/]" class="dh[field:line/]" [field:rel/]></a>
{/dede:channel}
修改/include/taglib/channel.lib.php文件的lib_channel函数
把如下代码
$attlist = "typeid|0,reid|0,row|100,col|1,type|son,currentstyle|,cacheid|";
修改成
$attlist = "typeid|0,reid|0,row|100,col|1,type|son,currentstyle|,cacheid|,line|1";
extract($ctag->CAttribute->Items, EXTR_SKIP);
添加如下代码
$default_line = $ctag->CAttribute->Items["line"];
$row[‘sonids‘] = $row[‘rel‘] = ‘‘;
修改成如下代码
$row[‘sonids‘] = $row[‘rel‘] = ‘‘;
$row[‘line‘] = $default_line+$i;