DedeCms autoindex和itemindex使用介绍
来源:互联网 发布:js实现图片90度旋转 编辑:程序博客网 时间:2024/05/19 03:18
autoindex/itemindex 可以使用 @me+1;实现由指定数字开始,下面为大家详细介绍下具体的两者具体的用法,感兴趣的朋友可以参考下
让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 的使用心得区别
channelartlist 标签下使用 {dede:global name='itemindex' runphp='yes'}@me;{/dede:global}
自增1
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}
<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}
标签下使用 [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}
如何自由定义 开始的数字
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}
对autoindex/itemindex使用自定义函数
先在include/extend.fun.php里添加自定义函数
function MyPosition($p){ $positionArr=array(275,330,380,435,495,547); return $positionArr[$p];
然后在模板里添加
{dede:channel type='son' typeid='13' row='6' noself='yes'} <!-----侧栏菜单------------------> <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}
0 0
- DedeCms autoindex和itemindex使用介绍
- 织梦dedecms自动编号autoindex和itemindex的使用
- DedeCms autoindex和itemindex 用法说明
- DedeCms autoindex和itemindex 用法说明
- 织梦DedeCms系统标签autoindex和itemindex用法说明
- dede itemindex/autoindex 使用心得
- DEDECMS{dede:channelartlist}autoindex无效用itemindex代替及他
- autoindex itemindex 区别
- 让dedecms autoindex,itemindex 从0到1开始的办法!
- Web_PHP_DedeCMS_channelartlist里,autoindex无效,用itemindex替代
- 使用autoindex标签给DEDECMS文章列表添加自动编号
- dedecms判断使用方面 [field:global runphp='yes' name=autoindex]
- 织梦dedecms channelartlist下autoindex失效解决办法
- 设置dedecms标签 [field:global.autoindex/] 初始值
- DEDECMS自动编号(序号)autoindex属性
- DEDECMS{dede:channelartlist}autoindex无效用
- DedeCMS中channelartlist自增参数global.itemindex
- DEDECMS自动编号(序号)[field:global.autoindex/]
- 关于Android Studio中android工程库的引用个人小结
- UI011---初识MVC
- android常用封装 --- BaseFragment
- 苹果电脑快捷键大全
- 算法导论——第五章概率分析与随机算法笔记
- DedeCms autoindex和itemindex使用介绍
- hdoj-2553 n 皇后问题【递归】
- Activiti 10分钟教程
- HTTP协议中PUT和POST使用上的区别
- ExpandLayout用法和封装自定义控件的一些小记
- HTML5桌面通知:notification api
- uva 10282 Babelfish(映射)
- hdu 5348 MZL's endless loop 欧拉回路
- mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file