星联网络专注帝国CMS二次功能插件开发-精品网站模板站长代码素材

  • 最近更新
  • 模板:33
  • 记录:12641|
  • 插件:52|
  • 工具:4|
  • 代码:8|
  • 评论:0

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

前言

本文主要讲解《织梦auoidex应用dedecms循环中判断第几条数据》的详细内容

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:globalrunphp='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:globalrunphp='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}

本网刊登的文章均仅代表作者个人观点,并不代表本网立场。文中的论述和观点,敬请读者注意判断。

本文地址:http://www.xlkjgs.com/notes/web/7727.html

以上内容由本站整理呈现,请务必在转载分享时注明本文地址!如对内容有疑问,请联系我们,谢谢!

星联网络

星联网络是中国最具实战的互联网创业者的知识服务商,这里有互联网行业动态,网络推广,SEO优化,SEM优化,ESC配置,行业经验分型,互联网项目,微信营销、淘宝客赚钱、新媒体营销、京东运营、跨境电商等众多互联网营销知识分享

站长运营站长必备网站运营之道才能长久发展