arclist 標簽下使用 [field:global.autoindex/] 默認從1開始
{dede:arclist row='10' titlelen='48' typeid='1' channelid='1'}
從1開始:[field:global runphp='yes' name=autoindex][/field:global]或者[field:global.autoindex/]
從0開始:[field:global runphp='yes' name=autoindex]@me=@me-1;[/field:global]
{/dede:arclist}
channel 標簽下使用 [field:global.autoindex/] 默認從0開始
{dede:channel row='5' type='top'}
從0開始:[field:global runphp='yes' name=autoindex][/field:global]或者[field:global.autoindex/]
從1開始:[field:global runphp='yes' name=autoindex]@me=@me+1;[/field:global]
{/dede:channel}
channelartlist 標簽下使用 {dede:global.itemindex/} 默認從1開始
{dede:channelartlist row='4'}
從1開始:{dede:global name=itemindex runphp='yes'}{/dede:global}或者{dede:global.itemindex/}
從1開始:{dede:global name=itemindex runphp='yes'}@me=@me-1;{/dede:global}
{/dede:channelartlist}
list 到第10條時輸出<br/>,否則輸出空
循環到第幾條加條線同理
{dede:list pagesize='40' orderby='id'}
<li><a title="[field:title function='htmlspecialchars(@me)'/] " href="[field:arcurl /]">[field:title /]</a></li>
[field:global name='autoindex' runphp='yes']if(@me%10==0){@me="<br/>";}else{@me='';}[/field:global]
{/dede:list}
新聞熱點
疑難解答