zoukankan      html  css  js  c++  java
  • wuzhicms 无规律推荐位标签的嵌套使用

    blob.png

    这种布局的页面,要做推荐位的话,往往需要做3个推荐位。但这样就得维护3个推荐位内容。

    其实可以通过简单粗暴的方式 一个推荐位即可搞定。

    如下代码:

     {wz:content action="block" pagesize="6" type="1" blockid="18"}
    <div class="col-xs-6">
                        <div class="narrowArt">
                            <a href="{$rs[0]['url']}" title="222">
                                <img  src="{$rs[0]['thumb']}" height="380">
                                <h1>{$rs[0]['title']}</h1>
                            </a>
                        </div>
                    </div>
                    <div class="col-xs-3">
                        <div class="narrowArt poto">
                            <a href="{$rs[1]['url']}" title="222">
                                <img  src="{imagecut($rs[1]['thumb'],273,182)}" height="">
                                <h2>{$rs[1]['title']}</h2>
                            </a>
                        </div>
                        <div class="narrowArt poto">
                            <a href="{$rs[2]['url']}" title="222">
                                <img  src="{imagecut($rs[2]['thumb'],273,182)}" alt="" height="">
                                <h2>{$rs[2]['title']}</h2>
                            </a>
                        </div>
                    </div>
                    <div class="col-xs-3">
    
                        <div class="headline-news-list">
                            <div class="media">
                                <div class="media-body">
                                    <h4 class="media-heading color_qiyelan font_size16" style="font-weight: normal"><a href="{$rs[3]['url']}">{$rs[3]['title']}</a></h4>
                                    <div class="media-content  color_777 ">{$rs[3]['remark']}</div>
                                </div>
                            </div>
                            <div class="media">
                                <div class="media-body">
                                    <h4 class="media-heading color_qiyelan font_size16" style="font-weight: normal"><a href="{$rs[4]['url']}">{$rs[4]['title']}</a></h4>
                                    <div class="media-content color_777">{$rs[4]['remark']}</div>
                                </div>
                            </div>
                            <div class="media">
                                <div class="media-body">
                                    <h4 class="media-heading color_qiyelan font_size16" style="font-weight: normal"><a href="{$rs[5]['url']}">{$rs[5]['title']}</a></h4>
                                    <div class="media-content color_777">{$rs[5]['remark']}</div>
                                </div>
                            </div>
                        </div>
                    </div>
    {/wz}

    通过主键直接赋值:

    {$rs[0]['title']}
    主键从0开始 ,自动增长:如,0,1,2,3....
  • 相关阅读:
    Shell编程之运算符和环境变量配置文件
    Shell编程之变量
    PCI BAR设置过程[转]
    基于ARM的SoC设计入门[转]
    负载均衡
    [转]vc中调用其他应用程序的方法(函数) winexec,shellexecute ,createprocess
    VC/DDK/DriverWorks开发环境配置
    windows下注册表脚本编写
    _cdecl与_stdcall区别
    在C语言中破坏函数调用堆栈
  • 原文地址:https://www.cnblogs.com/wuzhicms/p/5542985.html
Copyright © 2011-2022 走看看