akcms调用内容多时的分页


当一个页面里面调用的内容有点多时,我们可以使用分页

,item_display.htm内模板如下


<{php}>$this->_tpl_vars[MYPATH] = ceil($this->_tpl_vars['id']/1000);<{/php}>


模板

<table>
<{getitems bandindex="1" page=$page num="20" where="$string1" orderby="$string2" module="300" template="<tr<#ak_ifnotempty(#)[%titlecolor](#) class='bg1'(#)#>><td><IMG SRC='/img/star[scorenum].gif' BORDER=0></td><td><a href=()[url]() target=()_blank()  style=()color:#24489B;font-weight:bold;()>[shorttitle]</a><td<#ak_if(#)'[%orderby3]'=='0'(#) class=bg4#><#ak_if(#)'[%orderby3]'<='30'(#) class=bg3#>></td><td id='tl'>[digest:text]</td></tr>"}>
</table>
分页
<div id="page"><{getpaging page=$page template="<a href='d$id-[page].htm'>[page]</a> " baseurl="k$MYPATH/d$id-[page].htm" firstpage="k$MYPATH/d$id.htm" firstpagetemplate="<a href='[url]'>1</a> " currenttemplate="<span>[page]</span> " previoustemplate="<a href='[url]'>上一页</a> " noprevioustemplate=" " nexttemplate="<a href='[url]'>下一页</a> " nonexttemplate=" " paging="[previous][paging][next]" }></div>
 相关内容