-
水利工程施工類網(wǎng)站織夢(mèng)...
-
展覽展會(huì)信息類網(wǎng)站織夢(mèng)...
-
鋼結(jié)構(gòu)崗?fù)I(yíng)銷型織夢(mèng)網(wǎng)...
-
儀器儀表科技公司類網(wǎng)站...
-
玩具動(dòng)漫類網(wǎng)站織夢(mèng)模板...
-
物流快運(yùn)速遞類網(wǎng)站織夢(mèng)...
-
中英雙語(yǔ)律師事務(wù)所類網(wǎng)...
-
儀器分析儀類網(wǎng)站織夢(mèng)模...
-
食品百貨英文外貿(mào)類網(wǎng)站...
-
財(cái)稅記賬工商注冊(cè)認(rèn)證類...
-
電腦系統(tǒng)軟件下載類網(wǎng)站...
-
網(wǎng)站模板資源下載類網(wǎng)站...
-
蔬菜鮮果配送類網(wǎng)站織夢(mèng)...
-
營(yíng)銷型無(wú)縫鋼管定制生產(chǎn)...
-
裝飾建材公司類網(wǎng)站織夢(mèng)...
-
貂絨大衣服裝設(shè)計(jì)類網(wǎng)站...
-
精工機(jī)械軸承生產(chǎn)廠家類...
-
人力資源管理類網(wǎng)站織夢(mèng)...
-
電子元件電路板類網(wǎng)站織...
-
手游APP軟件下載類網(wǎng)站織...
讓dedecms autoindex,itemindex從0到1開始的辦法
[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global] {dede:global name=itemindex runphp="yes"}@me=@me+1;{/dede:global}
autoindex itemindex 的使用心得區(qū)別
channelartlist 標(biāo)簽下使用
{dede:global name='itemindex' runphp='yes'}@me;{/dede:global}
自增1
arclist 標(biāo)簽下使用 [field:global.autoindex/] 默認(rèn)從1開始
channel 標(biāo)簽下使用 [field:global.autoindex/] 默認(rèn)從0開始
channelartlist 標(biāo)簽下使用 {dede:global.itemindex/} 默認(rèn)從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}<div id="h_pd_lm_{dede:global.itemindex/}" {dede:global name='itemindex' runphp='yes'}@me=(@me==1)?'':'';{/dede:global} class="pd2_lmc_l1">
channelartlist實(shí)例
{dede:channelartlist notypeid='123,124,146,147'} <a class="pd2_lmt{dede:global name=itemindex runphp='yes'}@me=(@me==1)?'1':'3';{/dede:global}" onmouseover="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} </a> {/dede:channelartlist}
標(biāo)簽下使用
[field:global name=autoindex/]
channel實(shí)例
{dede:channel titlelen='32'} <li [field:global name='autoindex' runphp='yes']if(@me%2==0){@me='class="rr"';}else{@me='';}[/field:global] ><h3><a href='[field:typelink/]'>[field:typename/]</a></h3></li> {/dede:channel}
在arclist中使用autoindex runphp時(shí)用這種方式:
{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}
自增1
[field:global.autoindex/]
arclist實(shí)例
{dede:arclist channelid=17 row=6 orderby=pubdate titlelen=40 addfields='docphoto,docjob,doctec' typeid='123,136,146,155,172,182,202'} <div id="h_nrr_zj_[field:global.autoindex/]" class="nrr_zjl" [field:global name='autoindex' runphp='yes']if(@me==1){@me="";}else{@me='';}[/field:global] > <div><a href="[field:arcurl/]" title="[field:fulltitle/]" target="_blank"><img src="[field:litpic/]" alt="[field:fulltitle/]" /></a></div> </div> {/dede:arclist}
如何自由定義 開始的數(shù)字
autoindex/itemindex 可以使用 @me+1;實(shí)現(xiàn)由指定數(shù)字開始
遇到類似的問題做下這個(gè)筆記,在用到的時(shí)候可以靈活發(fā)揮!
list 標(biāo)簽下試用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}