织梦数值自动增加标签使用方法
在使用织梦DedeCMS系统制作排行榜等的榜单页面的时候,我们需要用到织梦的数值自动增长标签,当然,这个也是可以使用图片代替的,不过需要修改css,相对麻烦I.些.织梦的数值自动增长标签有两个autoindex和itemindex.这两个标签的用法是有些区别的.主要的区别
更多精彩就在: 51免费论文网|www.jxszl.com
如下:
channelartlist标签下使用itemindex标签
{dede:globalname=itemindexrunphp=yes}@me;{/dede:global}
channel标签下使用autoindex
[field:globalname=autoindex/]
相对来说,autoindex使用的比较多I.些.这个是由于很少人会用到channelartlist标签决定的.
在arclist中使用autoindex制作php语法runphp时用这种方式:
{dede:arclisttitlelen=IIIIrow=IVflag=corderby=id}
[field:title/]
[field:globalname=autoindexrunphp=yes]if(@me==II){@me="";}else{@me=;}[/field:global]
{/dede:arclist}
另外autoindex和itemindex两个自动数值增长标签是可以自定义开始数值的.这个非常有用,毕竟不是所有的榜单都是从I.开始的.autoindex和itemindex标签自定义开始的数值可以使用@me+I.;实现由指定数字开始,默认@me是I..
最后需要说明的是,list标签下也可以使用autoindex标签,具体代码如下:
{dede:listpagesize=IV0orderby=id}
[field:globalname=autoindexrunphp=yes]if(@me==0){@me="test";}else{@me=;}[/field:global]
{/dede:list}
织梦的两个数值自动增长标签autoindex和itemindex都比较方便,不过还是autoindex标签使用的比较多I.些.
原文链接:http://www.jxszl.com/biancheng/dedecms/76247.html