名称: pager_data($cfg=array())
功能: 分页列表, 适用于文章列表、商品列表
参数:
① page_fix 控制分页列表显示多少个页码切换标签,默认为3个;
② current_page_calss 当前页面标签CSS样式名,默认为 active ;
示例:
<div class="row"> {php}$_pager_data = EsiteApp::app()->pager_data(['tag_start'=>'<ul class="pagination pull-right">']);{/php} <div class="col-md-4 col-sm-4 items-info">{$_pager_data['summary_code']}</div> <div class="col-md-8 col-sm-8"> {$_pager_data['code']} </div> </div>
数据格式打印:
Array ( [tag_start] => <ul class="pagination pull-right"> [tag_end] => </ul> [page_first] => <li><a href="%s">首页</a></li> [page_str] => <li class="%s"><a href="%s">%s</a></li> [page_last] => <li><a href="%s">末页</a></li> [page] => 1 [page_fix] => 3 [page_total] => 16 [pagesize] => 12 [total_rows] => 184 [url] => /女士/p%s-products.html [current_page_calss] => active [summary_str] => <span class="paging-summary">共%s条,第%s/%s页</span> [code] => <ul class="pagination pull-right"> <li><a href="/女士/p1-products.html">首页</a></li> <li class="active"><a href="/女士/p1-products.html">1</a></li> <li class=""><a href="/女士/p2-products.html">2</a></li> <li class=""><a href="/女士/p3-products.html">3</a></li> <li><a href="/女士/p16-products.html">末页</a></li> </ul> [summary_code] => <span class="paging-summary">共184条,第1/16页</span> )