发表日期:2017-12 文章编辑:小灯 浏览次数:2161
我们在制作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 浏览次数:3264
日期:2019-09 浏览次数:4262
日期:2018-06 浏览次数:3533
日期:2018-06 浏览次数:3303
日期:2018-05 浏览次数:3524
日期:2018-05 浏览次数:3755
日期:2018-05 浏览次数:4403
日期:2018-05 浏览次数:3203
日期:2018-05 浏览次数:3346
日期:2018-05 浏览次数:3724
日期:2018-05 浏览次数:2908
日期:2018-03 浏览次数:2812
日期:2018-03 浏览次数:2778
日期:2018-01 浏览次数:2779
日期:2018-01 浏览次数:3410
日期:2018-01 浏览次数:2834
日期:2018-01 浏览次数:2653
日期:2017-12 浏览次数:2688
日期:2017-12 浏览次数:2970
日期:2017-12 浏览次数:2869
日期:2017-12 浏览次数:2555
日期:2017-12 浏览次数:2745
日期:2017-12 浏览次数:2685
日期:2017-12 浏览次数:2566
日期:2017-12 浏览次数:2632
日期:2017-12 浏览次数:2714
日期:2017-12 浏览次数:2657
日期:2017-12 浏览次数:2649
日期:2019-09 浏览次数:2616
日期:2017-12 浏览次数:2720
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.