<div class="moban_spzs">
<{section name=goodslist loop=$strdata6}>
<{if $smarty.section.goodslist.first}>
<div class="moban_spzsleft">
<p><{$strdata6[goodslist].name}></p>
<dd>¥<{$strdata6[goodslist].price}></dd>
<a href=goods_details.php?id=<{$id}>&categoryId=<{$strdata2[goodslist].categoryId}>&cmid=<{$strdata6[goodslist].cmid}>><img src="<{$strdata6[goodslist].faceImg}>"alt=""></a>
</div>
<{elseif $smarty.section.goodslist.index<2}>
<div class="moban_spzscont">
<p><{$strdata6[goodslist].name}></p>
<dd>¥<{$strdata6[goodslist].price}></dd>
<a href=goods_details.php?id=<{$id}>&categoryId=<{$strdata2[goodslist].categoryId}>&cmid=<{$strdata6[goodslist].cmid}>><img src="<{$strdata6[goodslist].faceImg}>"alt=""></a>
</div>
<{elseif $smarty.section.goodslist.index<3}>
<div class="moban_spzsright">
<div class="mobanright_div">
<p><{$strdata6[goodslist].name}></p>
<dd>¥<{$strdata6[goodslist].price}></dd>
<a href=goods_details.php?id=<{$id}>&categoryId=<{$strdata2[goodslist].categoryId}>&cmid=<{$strdata6[goodslist].cmid}>><img src="<{$strdata6[goodslist].faceImg}>"alt=""></a>
</div>
<{elseif $smarty.section.goodslist.index<4}>
<div class="mobanright_div1">
<p><{$strdata6[goodslist].name}></p>
<dd>¥<{$strdata6[goodslist].price}></dd>
<a href=goods_details.php?id=<{$id}>&categoryId=<{$strdata2[goodslist].categoryId}>&cmid=<{$strdata6[goodslist].cmid}>><img src="<{$strdata6[goodslist].faceImg}>"alt=""></a>
</div>
</div>
<{/if}>
<{/section}>
</div>

smarty section 循环不同的四个样式的更多相关文章

  1. smarty模板引擎中section循环loop与total的区别

    在smarty模板引擎的section循环中 $data=[101,102,103,105,104]; section的两个属性total与loop {section foo $data start= ...

  2. smarty在循环的时候计数来显示这是第几次循环的功能

    想必有很多人比较喜欢这个smarty循环的时候有个变量增加的功能或比较需要这个功能吧?其实不需要额外的变量,当然你也许根本用不了.我们用smarty内置的就可以了.就是smarty有foreach和s ...

  3. Smarty section、foreach控制循环次数的实现详解

    <!--{ section name='i' loop=$a }--><!--{ if $smarty.section.i.index < 3 }--><!--{  ...

  4. php smarty section使用

    文件:section.tpl <html> <head> <title></title> </head> <body> {sec ...

  5. UITableViewCellStyle 四种样式

    四种样式如下:

  6. 实验四  CSS样式的应用

    实验四  CSS样式的应用 注意:以下实验项目皆以本文件为操作对象,实验结果用记事本保留后预览,最后将添加的CSS代码转载到实验报告中 另本网页中蓝色加下划线的字即为默认的超链接样式 实验目的: 掌握 ...

  7. CSS 四种样式表 六种规则选择器 五种常用样式属性

    新的html程序要在VS中编写了,在vs中安装ASP.NET和Web开发,并用ASP.NET Web 应用程序(.NETFramework)创建一个网页程序.添加一个html页 后面的代码都是在htm ...

  8. Smarty的循环

    (1)section.sectionelse功能多,参数多.或许不是太实用.是smarty用来做循环操作的函数之一.(2)了解基本属性name和loop <section name=articl ...

  9. 9.Smarty的循环

    1.session循环 目的:循环输出一个二维数组 构造一个二维数组 $towSide = array( array("name"=>"caimuqing" ...

随机推荐

  1. Junit5常用注解

    0. IDEA中Maven项目测试类的新建方法 a. 如图在src目录下新建文件夹test b. 鼠标右键test,将该文件设置成test source c. 右键需要新建的测试类,如下图操作,选中T ...

  2. host文件简介及修改后不能保存解决方法

    一.文件概述 Hosts是一个没有扩展名的系统文件,可以用记事本等工具打开,其作用就是将一些常用的网址域名与其对应的IP地址建立一个关联“数据库”,当用户在浏览器中输入一个需要登录的网址时,系统会首先 ...

  3. 【异常】ERROR main:com.cloudera.enterprise.dbutil.SqlFileRunner: Exception while executing ddl scripts. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'ROLES' already exists

    1 详细异常 2019-10-11 10:33:55,865 INFO main:com.cloudera.server.cmf.Main: ============================= ...

  4. 【异常】 Could not find Linker 'g++' in system path.

    1 详细异常 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':az-ex ...

  5. idea仿eclipse的export导出功能

    自从开发工具从eclipse切换到idea来之后,才知道什么叫做'真香'.idea强大的扩展功能极大的拓展了他的可用性,最近有个功能就是通过idea的扩展插件搞定的. 事情是这样的,朋友使用eclip ...

  6. List.ForEach批量新增并发异常解决

    批量新增操作在业务系统中十分常见,尤其是主从表中对从表的批量处理.昨天在对wms主从表进行业务操作时使用了c#中list自带的函数ForEach对从表批量新增,代码如下: 在无并发的情况下接口请求正常 ...

  7. Elasticsearch下载安装

    本文链接:https://blog.csdn.net/yjclsx/article/details/81302041注:Elasticsearch 需要 Java 8 环境,在安装Elasticsea ...

  8. 如何通过字符串形式导包(importlib模块的使用)

    1 模块简介 Python提供了importlib包作为标准库的一部分.目的就是提供Python中import语句的实现(以及__import__函数).另外,importlib允许程序员创建他们自定 ...

  9. luogu P4843 清理雪道

    嘟嘟嘟 这其实就是一个最小流的板子题.把每一条边的流量至少为1,然后建立附加源汇跑一遍最大流,连上\(t, s\),再跑一遍最大流就是答案. 刚开始我想错了:统计每一个点的出度和入度,去两者较大值\( ...

  10. wait()函数

    wait()函数:回收僵尸进程 父进程调用wait函数可以回收子进程终止信息.该函数有三个功能: 1) 阻塞等待子进程退出 2) 回收子进程残留资源 3) 获取子进程结束状态(退出原因) /*** z ...