联系官方销售客服
1835022288
028-61286886
搜索页分页提示此标签没有设置urlrule参数,用的是官方模板。开启了伪静态、
{template "header.html"}
<div class="page-wrapper-row full-height">
<div class="page-wrapper-middle">
<div class="page-head">
<div class="container">
<div class="page-title">
这里是{MODULE_NAME}模块搜索页
</div>
</div>
</div>
<div class="page-content">
<div class="container">
<ul class="page-breadcrumb breadcrumb">
<li>
<a href="{SITE_URL}">网站首页</a>
<i class="fa fa-circle"></i>
</li>
{dr_catpos($catid, '', true, '<li><a href="[url]">[name]</a><i class="fa fa-circle"></i></li>')}
<li>
<span>搜索</span>
</li>
</ul>
<div class="search-page search-content-1">
<div class="portlet light">
<div class="portlet-title">
<div class="caption">
<span class="caption-subject font-green-sharp"> 条件筛选 </span>
</div>
</div>
<div class="portlet-body form fc-search-param">
<div class="form-body">
<div class="form-group row">
<label class="col-md-2 control-label">栏目分类</label>
<div class="col-md-9">
<label><a class="label {if !$cat || $cat.child}label-success{else}label-default{/if}" href="{Router::search_url($params, 'catid', $parent.id)}">不限</a></label>
<!--调用栏目分类,这种用法只能用于模块列表与搜索页面-->
{loop $related $t}
<label><a class="label {if $t.id==$cat.id}label-success{else}label-default{/if}" href="{Router::search_url($params, 'catid', $t.id)}">{$t.name}</a></label>
{/loop}
</div>
</div>
<!--按关键字搜索-->
<div class="form-group row">
<label class="col-md-2 control-label" style="padding-top:5px">内容搜索</label>
<div class="col-md-6">
<div class="input-group">
<input type="text" class="form-control" onkeypress="if(event.keyCode==13) {dr_module_search('search_keyword');return false;}" name='keyword' value='{$keyword}' id='search_keyword'>
<span class="input-group-btn">
<button class="btn blue" onclick="dr_module_search('search_keyword')" type="button"> <i class="fa fa-search"></i> 搜索</button>
</span>
</div>
</div>
</div>
<script>
// 这段js是用来执行搜索的
function dr_module_search(name) {
var url="{Router::search_url($params, 'keyword', 'dayrui')}";
var value = $("#"+name).val();
if (value) {
location.href=url.replace('dayrui', value);
} else {
$("#"+name).focus()
dr_tips(0, "输入关键字");
}
return false;
}
</script>
</div>
</div>
</div>
<div class="portlet light">
<div class="portlet-title">
<div class="caption">
<span class="caption-subject font-green-sharp"> 列表 </span>
</div>
<div class="actions">
<div class="btn-group">
<a href="{Router::search_url($params, 'order', null)}" class="btn btn-default {if !$params.order || $params.order=='updatetime'}active{/if}"> <i class="fa fa-clock-o"></i> 时间排序 </a>
<a href="{Router::search_url($params, 'order', 'hits')}" class="btn btn-default {if $params.order=='hits'}active{/if}"> <i class="fa fa-eye"></i> 点击排序 </a>
<a href="{Router::search_url($params, 'order', 'comments')}" class="btn btn-default {if $params.order=='comments'}active{/if}"> <i class="fa fa-comments-o"></i> 评论排序 </a>
<a href="{Router::search_url($params, 'order', 'avgsort')}" class="btn btn-default {if $params.order=='avgsort'}active{/if}"> <i class="fa fa-diamond"></i> 评分排序 </a>
<a href="{Router::search_url($params, 'order', 'support')}" class="btn btn-default {if $params.order=='support'}active{/if}"> <i class="fa fa-digg"></i> 支持量排序 </a>
{if dr_is_app('shang')}
<a href="{Router::search_url($params, 'order', 'donation')}" class="btn btn-default {if $params.order=='donation'}active{/if}"> <i class="fa fa-rmb"></i> 赞助排序 </a>
{/if}
</div>
</div>
</div>
<div class="portlet-body search-container ">
<ul>
<!--调用MOD_DIR模块的数据 id和total和order参数(本页面固有参数) page=1标示开启分页 urlrule分页地址规则 pagesize每页数量-->
{search module=MOD_DIR id=$searchid total=$sototal order=$params.order catid=$catid page=1 pagesize=10 urlrule=$urlrule}
<li class="search-item clearfix">
<a title="{$t.title}" href="{$t.url}">
<img src="{dr_thumb($t.thumb, 100, 90)}" width="100" height="90" style="margin-top: 15px;">
</a>
<div class="search-content text-left">
<h4 class="search-title">
<a title="{$t.title}" href="{$t.url}">{$t.title}</a>
</h4>
<p class="search-desc">{$t.description}</p>
<div class="search-post-foot">
<ul class="search-post-tags">
<!--关键词搜索列表-->
{php $kws=dr_get_content_kws($t.keywords);}
{loop $kws $name $url}
<li class="uppercase">
<a href="{$url}" target="_blank">{$name}</a>
</li>
{/loop}
</ul>
<div class="search-post-meta">
<i class="fa fa-calendar font-blue"></i>
<a href="javascript:;">{$t.updatetime}</a>
</div>
<div class="search-post-meta">
<i class="fa fa-eye font-blue"></i>
<a href="javascript:;">{$t.hits}</a>
</div>
<div class="search-post-meta">
<i class="fa fa-comments font-blue"></i>
<a href="javascript:;">{$t.comments}</a>
</div>
</div>
</div>
</li>
{/search}
</ul>
{if !$count}
<div class="row fc-search-null">
<div class="col-md-12 text-center">
<i class="fa fa-close fc-search-null-icon"></i>
<label class="fc-search-null-txt">没有找到相关内容...</label>
</div>
</div>
{/if}
<div class="search-pagination">
<ul class="pagination">
{$pages}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{template "footer.html"}