找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1218|回复: 0

[分享] dede有关autoindex的详细介绍

[复制链接]
发表于 2018-4-20 08:13:29 | 显示全部楼层 |阅读模式 来自 河南省新乡市
这个能实现递增,可以实现从2开始的{dede:global.itemindexrunphp='yes'}@me=$GLOBALS['itemindex']+1;{/dede:global.itemindex}
autoindex   itemindex 的使用心得
区别
channelartlist 标签下使用 {dede:global name='itemindex' runphp='yes'}@me;{/dede:global}
channel 标签下使用 [field:global name=autoindex/]
在arclist中使用autoindex runphp 时用这种方式:
{dede:arclist titlelen='22' row='4' flag='c' orderby='id'}<a href="[field:arcurl /]" target="_blank">[field:title /]</a>[field:global name='autoindex' runphp='yes']if(@me==2){@me="<br />";}else{@me=' ';}[/field:global]
{/dede:arclist}
  
如何自由定义 开始的数字
autoindex/itemindex 可以使用 @me+1;实现由指定数字开始
遇到类似的问题做下这个笔记,在用到的时候可以灵活发挥!
list 标签下试用autoindex
{dede:list pagesize='40' orderby='id'}
[field:global name='autoindex' runphp='yes']if(@me%10==0){@me="test";}else{@me='';}[/field:global]

runphp型
[field:global name=autoindex runphp="yes"](@me!=7)? @me=" | ":@me="";[/field:global]
数字序号型
其他用法,如果等于7,就显示style
{dede:global.itemindex runphp='yes'}(@me!=7)? @me="":@me="style='left:-150px'";{/dede:global.itemindex}
如何等于5,就什么也不显示
{dede:global.itemindex runphp='yes'}(@me!=5)? @me=" | ":@me="";{/dede:global.itemindex}

发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;

如何回报帮助你解决问题的坛友,好办法就是点击帖子下方的评分按钮给对方加【金币】不会扣除自己的积分,做一个热心并受欢迎的人!

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则 需要先绑定手机号

关闭

站长推荐上一条 /1 下一条

QQ|侵权投诉|广告报价|手机版|小黑屋|西部数码代理|飘仙建站论坛 ( 豫ICP备2022021143号-1 )

GMT+8, 2024-4-26 01:02 , Processed in 0.047015 second(s), 9 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表