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}
2、本站永久网址:https://www.yuanmacun.com
3、本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长进行删除处理。
4、本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
5、本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
6、本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
源码村资源网 » 织梦autoindex应用 dedecms循环中判断第几条数据