联系官方销售客服
1835022288
028-61286886
在搜索页面,因为不同模型的搜索排版,字段不一样,所以要进行模型判断来显示不同的样式,这个怎么做判断呢,求解
<div class="BgP10 clearfix">
{if module==news}
<ul class="nlist-box2 ">
{search module=news id=$searchid total=$sototal order=$params.order catid=$catid field=thumb,url,title,description,keywords,updatetime,hits,comments page=1 pagesize=10 urlrule=$urlrule}
<li class=""> <a class="Themetxthover" href="{$t.url}" title="{$t.title}">
<div class="news_det">
<p class="overflow Themetxthover">{$t.title}</p>
<span class="time">{dr_date($t._updatetime,'Y-m-d')} </span>
<div class="det_box">
{$t.description}
</div>
</div> </a> </li>
{/search}
</ul>
<div class="page">
<div class="col-lg-3">
共 {$total} 条记录 1 页
</div>
<div class="col-lg-9 pull-right">
<ul class="pagination">
</ul>
</div>
</div>
</div>
{else if module==tupian}
<div class="row photo">
<ul class="clearfix">
{search module=tupian id=$searchid total=$sototal order=$params.order catid=$catid field=thumb,url,title,description,keywords,updatetime,hits,comments page=1 pagesize=10 urlrule=$urlrule}
<li class="col-md-3">
<div class="thumbnail">
<a title="{$t.title}" href="{$t.url}"><img src="{dr_thumb($t.thumb)}" /></a>
<span><b>{$t.id}</b></span>
</div> <p>{$t.title}</p> </li>
{/search}
</ul>
<div class="clearfix"></div>
<div class="page">
<div class="col-lg-3">
共 {$total} 条记录 1 页
</div>
<div class="col-lg-9 pull-right">
<ul class="pagination">
</ul>
</div>
</div>
</div>
{/if}
我这样做是不生效的