首页 > CMS > 织梦DEDE > 正文

织梦中的自增函数

2024-07-12 08:42:19
字体:
来源:转载
供稿:网友

用织梦建站的朋友注意了,这些东西对新手来说可以说是至宝,我也是吸取了教训总结出来的,希望对大家能有所帮助.

  1. {dede:channelartlist} 
  2. {dede:global name='itemindex'/}频道页的自增函数 
  3. {/dede:channelartlist} 

例如:隔行样式

  1. {dede:global name=itemindex runphp='yes'}if(@me%2==0)@me='class=ol';else @me='';{/dede:global
  2. //开源软件:Vevb.com 
  3. {dede:arclist/} 
  4. [field:global.autoindex/]  

arclist中的自增函数

例如:隔五行加入一条横线

  1. {dede:list pagesize='20'
  2. <li><a href="[field:arcurl /]"  target=_blank>[field:title/]</a></li> 
  3. [field:global name=autoindex runphp="yes"]if(@me%5==0)@me="<hr />";else @me="";[/field:global
  4. {/dede:list}

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表