typecho获取当前页码/总页码

typecho1.0以前
记录的条数: $this->_total
当前页码:$this->_currentPage
总页码:$this->_totalPage
typecho1.1
记录的条数和当前页码模板中可以直接使用,总页码不能使用。
解决办法:用记录的条数除以每页文章显示的条数,如果有余数让余数进一。
当前页码:<?php if($this->_currentPage>1) echo $this->_currentPage; else echo 1;?>
总页码:<?php echo ceil($this->getTotal() / $this->parameter->pageSize); ?>
文章目录
