本文主要要給大家介紹的是織夢自增函數autoindex和itemindex功能。autoindex/itemindex 是織夢系統常用的2個自增函數,都可以使用 @me+1;實現由指定數字開始,下面361模板為大家詳細介紹下具體的兩者具體的用法。
讓dedecms autoindex,itemindex 從0到1開始的辦法
[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global]
{dede:global name=itemindex runphp="yes"}@me=@me+1;{/dede:global}1、channelartlist 標簽下使用
{dede:global name='itemindex' runphp='yes'}@me;{/dede:global}2、arclist 標簽下使用
[field:global.autoindex/]
默認從1開始
3、channel 標簽下使用
[field:global.autoindex/]
默認從0開始
4、channelartlist 標簽下使用
{dede:global.itemindex/}
默認從1開始
4、arclist 從0開始
[field:global name=autoindex runphp="yes"]@me=@me-1;[/field:global]
5、channel從1開始
[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global][field:typename/]
6、channelartlist 從0開始
{dede:global name=itemindex runphp='yes'}@me=@me-1;{/dede:global}你看懂了嗎?
新聞熱點
疑難解答