发表日期:2017-12 文章编辑:小灯 浏览次数:2155
我们在制作dedecms模板时,源代码中的[field:global name=autoindex/]标签很好用可以调用数字序号,此标签最简单的用法就是按内容条数来获取数字序号,但有的时候发现使用该标签时无效比如频道页。
channelartlist标签下可以使用{dede:global name=’itemindex’/}
dede:channel标签下直接使用[field:global name=autoindex/]
dede:channel标签当前样式currentstyle下时,需要修改文件,channel.lib.php文件,就可以使用~autoindex~ 来调用了
$linkOkstr = $currentstyle;
$row['typelink'] = GetOneTypeUrlA($row);
$linkOkstr = str_replace(“~rel~”,$row['rel'],$linkOkstr);
$linkOkstr = str_replace(“~id~”,$row['id'],$linkOkstr);
$linkOkstr = str_replace(“~typelink~”,$row['typelink'],$linkOkstr);
$linkOkstr = str_replace(“~typename~”,$row['typename'],$linkOkstr);
后面加上
$linkOkstr = str_replace(“~autoindex~”,$GLOBALS['autoindex']+1,$linkOkstr);
日期:2018-06 浏览次数:3258
日期:2019-09 浏览次数:4249
日期:2018-06 浏览次数:3529
日期:2018-06 浏览次数:3297
日期:2018-05 浏览次数:3519
日期:2018-05 浏览次数:3750
日期:2018-05 浏览次数:4394
日期:2018-05 浏览次数:3199
日期:2018-05 浏览次数:3339
日期:2018-05 浏览次数:3718
日期:2018-05 浏览次数:2892
日期:2018-03 浏览次数:2808
日期:2018-03 浏览次数:2766
日期:2018-01 浏览次数:2774
日期:2018-01 浏览次数:3390
日期:2018-01 浏览次数:2825
日期:2018-01 浏览次数:2646
日期:2017-12 浏览次数:2679
日期:2017-12 浏览次数:2965
日期:2017-12 浏览次数:2860
日期:2017-12 浏览次数:2548
日期:2017-12 浏览次数:2735
日期:2017-12 浏览次数:2681
日期:2017-12 浏览次数:2556
日期:2017-12 浏览次数:2627
日期:2017-12 浏览次数:2708
日期:2017-12 浏览次数:2654
日期:2017-12 浏览次数:2643
日期:2019-09 浏览次数:2612
日期:2017-12 浏览次数:2717
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.