导航
当前位置:网站首页 > 站长新闻 > CMS教程 > 织梦dede:channel的currentstyle里面加入~autoindex~自增

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

作者:达特 日期:2023-05-10 分类:CMS教程

织梦模板代码

1 {dede:channel type='top' row='10' currentstyle="<li class='hover'><a href='~typelink~' ~rel~><span>~typename~</span>~autoindex~</a></li>"}
2  
3 <li><a href='[field:typeurl/]' [field:rel/]><span>[field:typename/]</span>[field:global name=autoindex/]</a></li>
4  
5 {/dede:channel}

修改方法
打开 \include\taglib\channel.lib.php 找到
$linkOkstr = str_replace("~typename~",$row['typename'],$linkOkstr);
在它的下面加入
$linkOkstr = str_replace("~autoindex~",$GLOBALS['autoindex'],$linkOkstr);

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

猜你还喜欢

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论: