温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

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

发布时间:2020-06-13 21:35:22 来源:网络 阅读:575 作者:zhw810 栏目:开发技术

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


这种布局的页面,要做推荐位的话,往往需要做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">
                            <h2>{$rs[0]['title']}</h2>
                        </a>
                    </div>
                </div>
                <div class="col-xs-3">
                    <div class="narrowArt poto">
                        <a href="{$rs[1]['url']}" title="222">
                            <img  src="{p_w_picpathcut($rs[1]['thumb'],273,182)}" height="">
                            <h3>{$rs[1]['title']}</h3>
                        </a>
                    </div>
                    <div class="narrowArt poto">
                        <a href="{$rs[2]['url']}" title="222">
                            <img  src="{p_w_picpathcut($rs[2]['thumb'],273,182)}" alt="" height="">
                            <h3>{$rs[2]['title']}</h3>
                        </a>
                    </div>
                </div>
                <div class="col-xs-3">

                    <div class="headline-news-list">
                        <div class="media">
                            <div class="media-body">
                                <h5 class="media-heading color_qiyelan font_size16" ><a href="{$rs[3]['url']}">{$rs[3]['title']}</a></h5>
                                <div class="media-content  color_777 ">{$rs[3]['remark']}</div>
                            </div>
                        </div>
                        <div class="media">
                            <div class="media-body">
                                <h5 class="media-heading color_qiyelan font_size16" ><a href="{$rs[4]['url']}">{$rs[4]['title']}</a></h5>
                                <div class="media-content color_777">{$rs[4]['remark']}</div>
                            </div>
                        </div>
                        <div class="media">
                            <div class="media-body">
                                <h5 class="media-heading color_qiyelan font_size16" ><a href="{$rs[5]['url']}">{$rs[5]['title']}</a></h5>
                                <div class="media-content color_777">{$rs[5]['remark']}</div>
                            </div>
                        </div>
                    </div>
                </div>
{/wz}


通过主键直接赋值:

{$rs[0]['title']}
主键从0开始 ,自动增长:如,0,1,2,3....


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI