国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
DedeCms數(shù)字自增自減 autoindex和itemindex使用介

網(wǎng)上收集的關(guān)于dedecms autoindex/itemindex 可以使用 @me+1;實現(xiàn)由指定數(shù)字開始自增或自減的方法,下面為大家詳細介紹下具體的兩者具體的用法,感興趣的朋友可以參考下
 
代碼如下:

<span style="color: rgb(51, 51, 51); font-family: 宋體, arial, helvetica, sans-serif; font-size: 14px; line-height: 26px; "></span>

讓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)?'':'style="display:none;"';{/dede:global} class="pd2_lmc_l1">

channelartlist實例
代碼如下:

{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實例
代碼如下:

{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 時用這種方式:
代碼如下:

{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="
";}else{@me=' ';}[/field:global]{/dede:arclist}

自增1
[field:global.autoindex/]
arclist實例
代碼如下:

{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='style="display:none;"';}[/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;實現(xiàn)由指定數(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}

對autoindex/itemindex使用自定義函數(shù)
先在include/extend.fun.php里添加自定義函數(shù)
代碼如下:

function MyPosition($p){
$positionArr=array(275,330,380,435,495,547);
return $positionArr[$p];

然后在模板里添加
代碼如下:

{dede:channel type='son' typeid='13' row='6' noself='yes'}
<!-----側(cè)欄菜單------------------>
<div id='pdv_16795' class='pdv_class' title='' style="width:71px;height:20px;top:[field:global.autoindex function='MyPosition(@me)'/]px;left:136px; z-index:17">
<div style="FONT-FAMILY: SimSun; COLOR: #fecd2e; FONT-SIZE: 15px; fon-weight: bold"><a style="FONT-FAMILY: SimSun; COLOR: #fecd2e; FONT-SIZE: 15px; fon-weight: bold" href="[field:typeurl/]" target=_blank><strong>[field:typename/]</strong></a></div>
</div>
{/dede:channel}

本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
DEDECMS{dede:channelartlist}autoindex無效用itemindex代替及他
【米米素材網(wǎng)】織夢自動序列號自增標(biāo)簽[field:global.autoindex/]調(diào)用方法
設(shè)置dedecms標(biāo)簽 [field:global.autoindex/] 初始值
dedecms所有標(biāo)簽調(diào)用方式大全
織夢5.7DEDECMS標(biāo)簽大全 | 彥輝博客
dede:arclist里怎么調(diào)用全局變量?
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服