typecho归档页面如何分页
程序员文章站
2022-05-05 15:38:02
...
typecho 的归档页面文章输出我是这样写的:
widget('Widget_Contents_Post_Recent', 'pageSize=1000')->to($archives);
$year=0; $i=0; $j=0;
while($archives->next()):
$year_tmp = date('Y',$archives->created);
$y=$year;
if ($year != $year_tmp && $year > 0) $output .= '';
if ($year != $year_tmp) {
$year = $year_tmp;
$output = ''. $year .'
';
}
$output .= ''. $archives->title .'
'.date('F jS ',$archives->created).'
';
endwhile;
echo $output;
?>
但是不能分页,请问如何分页呢?
回复内容:
typecho 的归档页面文章输出我是这样写的:
widget('Widget_Contents_Post_Recent', 'pageSize=1000')->to($archives);
$year=0; $i=0; $j=0;
while($archives->next()):
$year_tmp = date('Y',$archives->created);
$y=$year;
if ($year != $year_tmp && $year > 0) $output .= '';
if ($year != $year_tmp) {
$year = $year_tmp;
$output = ''. $year .'
';
}
$output .= ''. $archives->title .'
'.date('F jS ',$archives->created).'
';
endwhile;
echo $output;
?>
但是不能分页,请问如何分页呢?
什么样的分页?