看来不少朋友需要不了解这个自增函数的用法,在这里我列举一些常见的写法以及作用。
 
[field:global name=autoindex/] !--普通打印递增的数字-- [field:global name=autoindex runphp=yes]@me=@me+5;[/field:global] !--将值加5后再打印-- [field:global name...
 
 
[field:global name=autoindex/]  <!--普通打印递增的数字-->
[field:global name=autoindex runphp="yes"]@me=@me+5;[/field:global] <!--将值加5后再打印-->
[field:global name=autoindex runphp="yes"](@me%2==0)? @me="|":@me="";[/field:global] <!--如果被2整除则打印竖线否则为空-->
[field:global name=autoindex runphp="yes"](@me!=8)? @me="|":@me="";[/field:global]  <!--如果不等于8输出竖线否则为空,即为8的时候不打印竖线-->
 
[field:global runphp='yes' name=autoindex]
           $a="<li>";
           $c="<li class='line'>";
           if ((@me % 5) == 0) @me = $c;
           else @me = $a;
 [/field:global]  <!--常见的列表每5行有下划线-->
  
  
  [field:global runphp='yes' name=autoindex]
           $a="<div class='box'>";
           $b="广告1";
           $c="</div>";
           $d="广告2";
           $e="";
           if (@me == 5) @me = $a.$b.$c;
              else if (@me == 10) @me = $a.$d.$c;
           else @me = $e;
 [/field:global]
  
 {dede:global name='itemindex' runphp='yes'}
 
           $a="<dl class='box1 w335 fl'>";
           $c="<dl class='box1 w335 fr'>";
           if ((@me % 2) == 0) @me = $c;
           else @me = $a;
{/dede:global}
 
 
[field:global name="autoindex" runphp="yes"]
        if (@me <= 3) @me=@me-1;
        else if (@me%4 == 0) @me = "3";
        else if (@me%4 == 1) @me = "0";
        else if (@me%4 == 2) @me = "1";
        else if (@me%4 == 3) @me = "2";
        else @me = "";

织梦自增函数[field:global name=autoindex/]常见用法的更多相关文章

  1. 织梦dedecms搜索页加上序列号autoindex

    在我们做织梦搜索页模板的时候经常会使用到autoindex标签.那么怎么才能实现搜索页可以使用呢?下面给大家分享下解决方法: 打开文件:include/arc.searchview.class.php ...

  2. DEDE [field:global name=autoindex/] 按序列号递增

    在用织梦仿站的时候,有些class样式是btn1.btn2这样的样式循环的,这个时候1.2可以用[field:global name=autoindex/ ] 循环得到,[field:global n ...

  3. 织梦DEDECMS {dede:field name='position'/}标签增加其它属性的

    在默认情况下,织梦(DedeCms)系统当前位置的调用标签为: {dede:field name='position'/} 在这种默认的情况下,生成后的代码大致为如下格式: 主页 > 应用软件 ...

  4. 织梦dedecms模板制作时,循环递增autoindex使用方法整理

    文章转载:http://www.maihui123.com/dedecms/2012051964.html 织梦dedecms模板制作时,我们需要每循环一次,变量加一,这是就需要使用到autoinde ...

  5. 设置dedecms标签 [field:global.autoindex/] 初始值{class递增}

    在{dede:arclist/}这个标签中有个[field:global.autoindex/],是从0开始自增,如果我们想自定义一个数值,比如自定义从2开始.那么就可以写成下面代码: [field: ...

  6. 织梦dedecms自增变量autoindex标签的使用(转)

    织梦dedecms自增变量autoindex标签的使用 例1: {dede:arclist titlelen='120' row='8' typeid='2'}         <li clas ...

  7. 织梦autoindex应用 dedecms循环中判断第几条数据

    arclist 标签下使用 [field:global.autoindex/] 默认从1开始 {dede:arclist row='10' titlelen='48' typeid='1' chann ...

  8. 织梦dedecms列表序号从0到1开始的办法 autoindex,itemindex标签

    自增1 arclist            标签下使用 [field:global.autoindex/] 默认从1开始 channel         标签下使用 [field:global.au ...

  9. DEDE织梦常用的调用方法

    DEDE织梦常用的调用常规调用: 网站名称调用:<title>{dede:global.cfg_webname/}</title> 网站关键词调用:<meta name= ...

随机推荐

  1. Redis和SpringBoot整合RedisUtils类

    一.引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId> ...

  2. Codeforces 1191A Tokitsukaze and Enhancement

    题目链接:http://codeforces.com/problemset/problem/1191/A 思路:枚举 16 种情况输出最高的就行. AC代码: #include<bits/std ...

  3. cesium安装及第一个示例

    cesium安装及第一个示例 一.环境要求 二.浏览器要求 三.安装node.js 四.下载cesium包(地址为https://cesiumjs.org) 包括了 五.在你的项目里引入相关js与cs ...

  4. 【AI图像识别一】人脸识别测试探索

    ****************************************************************************** 本文主要介绍AI能力平台的人脸识别技术的测 ...

  5. Java服务定位器模式

    当我们想要使用JNDI查找来定位各种服务时,使用服务定位器设计模式. 考虑到为服务查找JNDI的高成本,所以在服务定位器模式使用缓存技术. 首次需要服务时,服务定位器在JNDI中查找并缓存服务对象. ...

  6. splay模版

    //splay模版 #include<iostream> #include<cstdio> #include<cstdlib> #include<cstrin ...

  7. hadoop备战:hbase的分布式安装经验

    配置HBase时,首先考虑的肯定是Hbase版本号与你所装的hadoop版本号是否匹配.这一点我在之前 的博客中已经说明清楚,hadoop版本号与hbase版本号的匹配度,那是官方提供的.以下的实验就 ...

  8. plsql创建一个表、序列、和触发器

    plsql创建表后不能直接让id递增,因此要手动创建,下面是例子: 1.创建表 SQL: create table student(id number primary key,name varchar ...

  9. 我的vscode配置 利用Settings Sync一键安装

    { "prettier.eslintIntegration": true, // 点击保存时,根据 eslint 规则自定修复,同时集成 prettier 到 eslint 中 & ...

  10. vue项目 (1) vue结合mini-ui 的使用

    1.安装 npm install mini-ui -S 2. 使用 import Vue from 'vue' import App from './App' import router from ' ...