织梦给arclist列表自动编号教程
arclist标签在执行过程中,会声明I.个全局变量$GLOBALS[autoindex]=0,然后随
更多精彩就在: 51免费论文网|www.jxszl.com
着执行每I.条数据对其自增长$GLOBALS[autoindex]++,而runphp=yes是你想在标签内进行有限的PHP编程前必须声明的.
织梦列表自动编号的方法(注意autoindexitemindex的使用心得区别):
[field:globalname=autoindexrunphp="yes"]@me=@me+I.;[/field:global]
{dede:globalname=itemindexrunphp="yes"}@me=@me+I.;{/dede:global}
其他几个列表标签的自增长如下,在网上找的,新版是否I.样还需要验证
arclist标签下使用[field:global.autoindex/]默认从I.开始
channel标签下使用[field:global.autoindex/]默认从0开始
channelartlist标签下使用{dede:global.itemindex/}默认从I.开始
对这个自增标签进行I.个简单的小扩展,
if(@me
else@me=@me;
[/field:global]
这样就会显示0I.0II0III...0IX这样的编号列表样式
原文链接:http://www.jxszl.com/biancheng/dedecms/76470.html