织梦系统标签autoindex和itemindex
[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global] {dede:global name=itemindex runphp="yes"}@me=@me+1;{/dede:global} autoindex ? itemindex 的使用心得区别 ? channelartlist 标签下使用 {dede:global name='itemindex' runphp='yes'}@me;{/dede:global} arclist ? ? ? ? ? ?标签下使用 [field:global.autoindex/] 默认从1开始 channel ? ? ? ? 标签下使用 [field:global.autoindex/] 默认从0开始 channelartlist 标签下使用 {dede:global.itemindex/} ?默认从1开始 arclist ?从0开始 [field:global name=autoindex runphp="yes"]@me=@me-1;[/field:global] channel ?从1开始 [field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global][field:typename/] channelartlist ?从0开始 {dede:global name=itemindex runphp='yes'}@me=@me-1;{/dede:global} ===================================================================================== {dede:channelartlist ?notypeid='123,124,146,147'} ? ? ?SEOver="showitem2({dede:global name=itemindex runphp='yes'}@me=@me-1;{/dede:global},'pd_lm','h_pd_lm_','pd2_lmt');" href='{dede:field name='typeurl'/}'> {dede:php}if($refObj->Fields['ispart']){echo $refObj->Fields['typename'];}{/dede:php} channel 标签下使用 [field:global name=autoindex/] ? {dede:channel titlelen='32'} ? ? ? ? {/dede:channel} 在arclist中使用autoindex runphp 时用这种方式: {dede:arclist titlelen='22' row='4' flag='c' orderby='id'} ? ? ? ? ? ? ?[field:global name='autoindex' runphp='yes']if(@me==2){@me=" 自增1 [field:global.autoindex/] {dede:arclist channelid=17 row=6 orderby=pubdate titlelen=40 addfields='docphoto,docjob,doctec' typeid='123,136,155,172,182,202'} ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? {/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]? {/dede:list} (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |