我的代码如下,目前不能按照MID显示发布者发布内容,只能全部调用出来。PS:我自建了商品模型2,现需要调用mid=2的UID发布的内容。
红色部分都没起作用,请问原因。 已经尝试过:union="uid=$info.uid" union="ext_id=$id" where="ext_id=$id" where="uid=$info.uid" 均未起作用,另外mid写在模板上也没起作用。求解决方法,谢谢。该末班位于/index_style/default/xxx/content/pc_show.htm 是黄页下的内容模板
{qb:hy name="hy_pcshow_shop001" type="shop" mid="2" union="uid=$info.uid" order="id" by="asc" rows="8" js="hy_pcshow_shop001"}
<div class="product">
<div class="img"><a href="{$rs.url}"><img src="{$rs.picurl}" onerror="this.src='__STATIC__/images/nopic.png'" width="240" height="180" title="{$rs.title}" /></a></div>
<div class="info">
<div class="w"><img src="{$rs.user_icon}" width="50" height="50" /></div>
<div class="t">
<div><a href="{:get_url('user',$rs['uid'])}" class="green">{$rs.username}</a></div>
<div><span style="color:#999999;">价格:</span><span>¥ {$rs.price} 元</span></div>
</div>
</div>
</div>
{/qb:hy}
可以用的
几个问题注意下,因为这个标签是本身内容页里面就存在的,但是因为修改了union为where这样用,并且添加了mid=2,也就是说,你对这个标签进行修改了,那你最好去后台清理下缓存,或者前台双击标签,编辑的时候,选择清空数据下
第二因为shop本身只有模型1,你新建立了模型,发布商品的时候你看下是不是发布到模型2下了