发表日期:2017-12 文章编辑:小灯 浏览次数:2153
我们在制作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 浏览次数:3253
日期:2019-09 浏览次数:4241
日期:2018-06 浏览次数:3527
日期:2018-06 浏览次数:3294
日期:2018-05 浏览次数:3517
日期:2018-05 浏览次数:3748
日期:2018-05 浏览次数:4391
日期:2018-05 浏览次数:3197
日期:2018-05 浏览次数:3336
日期:2018-05 浏览次数:3713
日期:2018-05 浏览次数:2890
日期:2018-03 浏览次数:2806
日期:2018-03 浏览次数:2762
日期:2018-01 浏览次数:2773
日期:2018-01 浏览次数:3384
日期:2018-01 浏览次数:2823
日期:2018-01 浏览次数:2645
日期:2017-12 浏览次数:2678
日期:2017-12 浏览次数:2964
日期:2017-12 浏览次数:2857
日期:2017-12 浏览次数:2547
日期:2017-12 浏览次数:2731
日期:2017-12 浏览次数:2680
日期:2017-12 浏览次数:2552
日期:2017-12 浏览次数:2626
日期:2017-12 浏览次数:2707
日期:2017-12 浏览次数:2649
日期:2017-12 浏览次数:2641
日期:2019-09 浏览次数:2611
日期:2017-12 浏览次数:2713
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.