分页代码可用在分类页、筛选页、搜索页、文章内容页、留言本、评论、专题首页等页面,使用前提是页面有包含paging='yes'获取分页数据的标签。
其中包含隐藏参数pageurl="",视频默认是vod/type,文章分页默认是art/type,分页时必须加入此参数以免分页出错!!!
例如:
{maccms:vod num="10" paging="yes" pageurl="vod/type"} {/maccms:vod}
视频分类页是pageurl="vod/type"
视频筛选页是pageurl="vod/show"
视频搜索页是pageurl="vod/search"
首页是pageurl="index/index"
文章分类页是pageurl="art/type"
文章筛选页是pageurl="art/show"
文章搜索页是pageurl="art/search"
<div class="mac_pages"> <div class="page_tip">共{$__PAGING__.record_total}条数据,当前{$__PAGING__.page_current}/{$__PAGING__.page_total}页</div> <div class="page_info"> <a class="page_link" href="{$__PAGING__.page_url|mac_url_page=1}" title="首页">首页</a> <a class="page_link" href="{$__PAGING__.page_url|mac_url_page=$__PAGING__.page_prev}" title="上一页">上一页</a> {maccms:foreach name="$__PAGING__.page_num" id="num"} {if condition="$__PAGING__['page_current'] eq $num"} <a class="page_link page_current" href="javascript:;" title="第{$num}页">{$num}</a> {else} <a class="page_link" href="{$__PAGING__.page_url|mac_url_page=$num}" title="第{$num}页">{$num}</a> {/if} {/maccms:foreach} <a class="page_link" href="{$__PAGING__.page_url|mac_url_page=$__PAGING__.page_next}" title="下一页">下一页</a> <a class="page_link" href="{$__PAGING__.page_url|mac_url_page=$__PAGING__.page_total}" title="尾页">尾页</a> <input class="page_input" type="text" placeholder="页码" id="page" autocomplete="off" style="width:40px"> <button class="page_btn mac_page_go" type="button" data-url="{$__PAGING__.page_url}" data-total="{$__PAGING__.page_total}" data-sp="{$__PAGING__.page_sp}">GO</button> </div> </div>