dedecms中channel标签的currentstyle里加入autoindex自增

织梦技巧评论321 views阅读模式

初始代码:

{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);

企鹅博客
  • 本文由 发表于 2020年9月19日 05:36:45
  • 转载请务必保留本文链接:https://www.qieseo.com/34888.html

发表评论