zoukankan      html  css  js  c++  java
  • smarty section 循环不同的四个样式

    <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>

  • 相关阅读:
    SSM框架整合以及书籍管理CRUD系统
    FastJson将Java对象转换成json
    2016 USP Try-outs The Knapsack problem
    HDU6624
    杂题
    AtCoder Grand Contest 049 Increment Decrement
    Codeforces Round #684 (Div. 1)
    World Finals 2014 I
    bzoj1892
    CF1307G
  • 原文地址:https://www.cnblogs.com/apolloren/p/9388130.html
Copyright © 2011-2022 走看看