织梦园模板网提供云优cms模板,pbootcms模板,Wordpress主题模板等各类企业新闻资讯网站模板下载服务。织梦园网站模板交流群
用户名:
密码:
注册
注册后享受折扣价

织梦dede:channel的currentstyle里面加入~autoindex~自增

织梦园模板 / 2019-04-19 / 收藏
织梦模板代码
{dede:channel type='top' row='10' currentstyle="<li class='hover'><a href='~typelink~' ~rel~><span>~typename~</span>~autoindex~</a></li>"}

<li><a href='[field:typeurl/]' [field:rel/]><span>[field:typename/]</span>[field:global name=autoindex/]</a></li>

{/dede:channel}

修改方法

打开 \include\taglib\channel.lib.php 找到

$linkOkstr = str_replace("~typename~",$row['typename'],$linkOkstr);

在它的下面加入

$linkOkstr = str_replace("~autoindex~",$GLOBALS['autoindex'],$linkOkstr);

相关织梦技巧

收缩