找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 126|回复: 0

[cms教程] 织梦autoindex的用法大全,在各个标签中运用

[复制链接]

该用户从未签到

发表于 2020-2-14 10:52:44 | 显示全部楼层 |阅读模式

您需要 登录 才可以下载或查看,没有账号?立即注册

×
下面来说一个在织梦dedecms列表页我们可以使用autoindex和itemindex来实现多种样式的用法
         
         大家在使用autoindex的时候有时候从1开始,有时候从0开是,下面介绍下什么情况下从0,1开始:
         
        autoindex/itemindex 可以使用 @me+1;  更改数字自由定义开始的数字  不懂往下看
         
         
         
        arclist 标签下使用 [field:global.autoindex/, 默认从1开始
         
         
         
        {dede:arclist row='10' titlelen='48' typeid='1' channelid='1'}
         
        从1开始:[field:global runphp='yes' name=autoindex,[/field:global,或者[field:global.autoindex/,
         
        从0开始:[field:global runphp='yes' name=autoindex,@me=@me-1;[/field:global,
         
        {/dede:arclist}
         
         
         
        channel 标签下使用 [field:global.autoindex/, 默认从0开始
         
        {dede:channel row='5' type='top'}
         
        从0开始:[field:global runphp='yes' name=autoindex,[/field:global,或者[field:global.autoindex/,
         
        从1开始:[field:global runphp='yes' name=autoindex,@me=@me+1;[/field:global,
         
        {/dede:channel}
         
         
         
        channelartlist 标签下使用 {dede:global.itemindex/} 默认从1开始
         
        {dede:channelartlist row='4'}
         
        从1开始:{dede:global name=itemindex runphp='yes'}{/dede:global}或者{dede:global.itemindex/}
         
        从1开始:{dede:global name=itemindex runphp='yes'}@me=@me-1;{/dede:global}
         
        {/dede:channelartlist}
         
         
         
        list  到第10条时输出
,否则输出空
         
        循环到第几条加条线同理
         
        {dede:list pagesize='40' orderby='id'}
         
        [*,[url=,[field:title /,[/url]
         
        [field:global name='autoindex' runphp='yes',if(@me%10==0){@me="
";}else{@me='';}[/field:global,  
         
        {/dede:list}
回复

使用道具 举报

网站地图|页面地图|文字地图|Archiver|手机版|小黑屋|找资源 |网站地图

GMT+8, 2024-10-7 00:20

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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