我们在用dedecms织梦做栏目导航时,需要用到下面的样式:
<a href="#" class="dh1"></a> <a href="#" class="dh2"></a> <a href="#" class="dh3"></a> <a href="#" class="dh4"></a> <a href="#" class="dh5"></a>
这样的序列在标签{dede:channel}中是无法调用的,所以必须修改标签,
默认的{dede:channel}调用方法:
{dede:channel type='top' row='8'}
<a href="[field:typeurl/]" [field:rel/] title="[field:typename/]" class="dh1">[field:typename/]</a>
{/dede:channel}
通过修改,改成下面的样式:
{dede:channel type='top' row='8' line='2'}
<a href="[field:typeurl/]" title="[field:typename/]" class="dh[field:line/]" [field:rel/]></a>
{/dede:channel}
修改步骤如下:
一、修改文件include/taglib/channel.lib.php,把
DEDE模板
$attlist = "typeid|0,reid|0,row|100,col|1,type|son,currentstyle|,cacheid|";