看了很久的教程,调用cms下某一篇文章的组图还是没找到答案,求赐教
如:cms频道新建了一个id为18的栏目,在此栏目下增加了一条id为23的内容,要调用这条内容的图片怎么调用啊
帮你代码修改了下,你自己参考着弄吧
{qb:tag name="pc_index_img" type="cms" mid="2" where="id=19" } <div class="qb_ui_SlideStyle1" height='500'> <div class="slide"> <ul> {volist name="rs.picurls" id="pic"} <li><a href="{$rs.url}"><img src="{$pic.picurl}"></a><span>{$rs.title}</span></li> {/volist} </ul> </div> </div> <script type="text/javascript" src="__STATIC__/js/slidestyle1.js"></script> {/qb:tag}
{block name="body_AllScorllSlide"} <!--幻灯片样式1__STATIC__/css/qb_ui.css中控制----> <!--幻灯片高度由height参数控制,如果参数小于50则按参数*10的宽高比显示,否则按参数值显示高度---> {qb:tag name="pic" type="cms" where="id=1"} <div class="qb_ui_SlideStyle1" height='500'> <div class="slide"> <ul> {volist name="rs.picurls" id="pic"} <a href="{$rs.url}"><img src="{$pic.picurl}" onmouseover='thisimg_over($(this))' onmouseout='thisimg_out($(this))'/></a></div> {/volist} </ul> </div> </div> <script type="text/javascript" src="__STATIC__/js/slidestyle1.js"></script> {/qb:tag} {/block}
首页pc_index.html的
你是要指定ID的内容吗?
还是说对所有内容都实现?
把你的需求描述详细些
组图
{qb:tag name="xxx001" type="cms" where="id=118"} {volist name="rs.picurls" id="pic"} <img src="{$pic.picurl}" width="50" height="50" /> {/volist} {/qb:tag}
文章内容的图片
{qb:tag name="xxx001" type="cms" where="id=118"} {volist name=":fun('Content@get_images',$rs.full_content)" id="pic"} <img src="{$pic.picurl}" width="50" height="50" /> {/volist} {/qb:tag}
https://x1.php168.com/bbs/show-4511.html