dedecms织梦模板arclist实现序号排序

直奔主题了,很多站长想要做这样的效果,比如某处的arclist标签里想要做出来序列号效果,如图所示:
织梦arclist 递增序列号
代码如下:
 {dede:arclist row='10' typeid='1'}
[field:global name=autoindex/]<a href=http://www.dede58.com/"[field:arcurl/]" title="[field:title /]">[field:title /]</a>
 {/dede:arclist}
[field:global name=autoindex/] 递增序列号标签解析:
 [field:global name=autoindex/]  从1开始
[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global] 从2开始
channelartlist标签中调用:
{dede:global name='itemindex' runphp='yes'}@me=@me+1;{/dede:global} 
{dede:global.itemindex/} 默认从1开始
{dede:global name=itemindex runphp='yes'}@me=@me-1;{/dede:global} 从0开始

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/f85b7308ebed6d5851e04c1cf2e871e3.html