织梦自动序列号自增标签[field:global.autoindex/]调用方法

[field:global.autoindex/]

如果要从第三个顺序调用 就调用以下标签 更改下面的+3中的3即可

[field:global name=autoindex runphp=“yes”]@me=@me+3;[/field:global]
或者
[field:global.autoindex function=“(@me+3)”/]也可

另外还有一种调用情况

标题描述的不太清楚,我们先看图:
在这里插入图片描述

很多时候我们在做文章列表前面的序号时都直接采用的是背景图片来实现的,但是这样我们在实际写页面过程中需要手动调整每个序号间的间距,对于排版来说非常的麻烦。今天这个文章的目的就是是介绍怎么利用dedecms的[field:global.autoindex/]来实现前面的序号以及背景样式。

实现方法:我们先看下面一段代码

{dede:arclist typeid=’1′ limit=’0,10′ titlelen=’30′}

  • //@me 表示这个标记本身的值

    //autoindex 自增序号 就想是一般循环有语句中的 i++ 循环一次 自动加1

    //runphp=”yes” 在php程序中运行

    // em 大家都懂吧 是一个html标签其他的大家都懂的 我就不扯了

    模板经过解析后前台显示为

  • 01<###
  • 02##
  • 03##
  • 09##
  • 10##
  • 显示为10行,而且前面都带有编号,至于序号上的颜色边框我想大家用css或者是图片都是可以实现的吧!

    解释下上面的语句,autoindex<4 则让autoindex的值返回3 如果autoindex<10 则让autoindex的值返回0autoindex;

    如果说你要调用数字非常有规律,跟[field:global name=autoindex runphp=“yes”]@me;[/field:global]中的@me 成等比或者是等差或者是相差一个固定的数值,那么可以这样写@me=“@me”+1 ,其它请自行尝试@me=“@me+1 ”是不对的,那样+1会看作是一个字符串!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
2023/07/24 15:14:58 [error] 721#0: *763 client intended to send too large body: 113069413 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89/XMind2022%EF%BC%8864bit%EF%BC%89/app.asar HTTP/2.0", host: "hetx.top" 2023/07/24 15:15:06 [error] 721#0: *763 client intended to send too large body: 113069413 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89/XMind2022%EF%BC%8864bit%EF%BC%89/app.asar HTTP/2.0", host: "hetx.top" 2023/07/24 15:16:12 [error] 721#0: *763 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:16:40 [error] 721#0: *763 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:16:43 [error] 721#0: *763 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:16:45 [error] 721#0: *763 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:19:37 [error] 721#0: *878 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:20:30 [error] 721#0: *878 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:31:12 [error] 1209#0: *28 client intended to send too large body: 134120318 bytes, client: 101.83.232.139, server: hetx.top, request: "PUT /index.php/dav/my/%E6%96%87%E4%BB%B6/XMind2022%EF%BC%8864bit%EF%BC%89.7z HTTP/2.0", host: "hetx.top" 2023/07/24 15:42:10 [error] 1209#0: *110 directory index of "/www/wwwroot/hetx.top/static/" is forbidden, client: 113.142.131.55, server: hetx.top, request: "GET /static/ HTTP/1.1", host: "hetx.top"
最新发布
07-25

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值