关闭

wuzhicms无规律推荐位标签的嵌套使用

87人阅读 评论(0) 收藏 举报

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

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:53710次
    • 积分:1305
    • 等级:
    • 排名:千里之外
    • 原创:78篇
    • 转载:6篇
    • 译文:0篇
    • 评论:3条
    最新评论