首页进行模块内容分页显示,用到的标签是module,
{module module=news page=1 pagesize=10 urlrule=/index.php?page=[page]} {t.title} {/module} {$pages}
这是很标准的写法,循环news模块内容列表,每页显示10条内容,下页地址格式是:index.php?page=2。
========伪静态模式=========
绝大部分站点下页都会才有伪静态的模式,例如下页格式为:/page-2.html的写法:
{module module=news page=1 pagesize=10 urlrule=/page-[page].html} {t.title} {/module} {$pages}
这时候访问下页会出现404现象,需要手动写上解析规则,config/rewrite.php:
"page\-([0-9]+)\.html(.*)" => 'index.php?c=home&m=index&page=$1',
网站首页调用文章怎么才可以实现分页功能
首页翻页点击翻页提示还有首页现在默认是10个一页如何改成100一个每页