百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>织梦CMS教程> dedecms织梦autoindex应用 dedecms循环中判断第几条数据
分享文章到:

dedecms织梦autoindex应用 dedecms循环中判断第几条数据

发布时间:02/19 来源:未知 浏览: 关键词:

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}

 
打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有63人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板