"景先生毕设|www.jxszl.com

织梦模板DedeCMS栏目列表常见序号的调用标签

2022-10-29 16:40编辑: www.jxszl.com景先生毕设
我们在制作DEDECMS模板时,源代码中的[field:globalname=autoindex/]标签很好用可以调用数字序号,此标签最简单的用法就是按内容条数来获取数字序号,但有的时候发现使用该标签时无效比如频道页.
channelartlist标签下可以使用{dede:globalnam

 更多精彩就在: 51免费论文网|www.jxszl.com 
e=’itemindex’/}
dede:channel标签下直接使用[field:globalname=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]+I.,$linkOkstr);


原文链接:http://www.jxszl.com/biancheng/dedecms/76356.html