typecho歸檔頁面如何分頁

WBOY
發布: 2016-10-10 11:55:59
原創
2069 人瀏覽過

typecho 的歸檔頁面文章輸出我是這樣寫的:

<code class="php"><?php
                    $this->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 .= '<div></div>';
                        if ($year != $year_tmp) {
                            $year = $year_tmp;
                            $output = '<h2 class="archive-year">'. $year .'</h2>';
                        }
                        $output .= '<a class="transition archive-iterm" href="'.$archives->permalink .'"><h3 class="archive-title">'. $archives->title .'</h3><p class="archive-date">'.date('F jS ',$archives->created).'</p></a>';
                    endwhile;
                    
                    echo $output;
                ?></code>
登入後複製
登入後複製

但是不能分頁,請問如何分頁呢?

回覆內容:

typecho 的歸檔頁面文章輸出我是這樣寫的:

<code class="php"><?php
                    $this->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 .= '<div></div>';
                        if ($year != $year_tmp) {
                            $year = $year_tmp;
                            $output = '<h2 class="archive-year">'. $year .'</h2>';
                        }
                        $output .= '<a class="transition archive-iterm" href="'.$archives->permalink .'"><h3 class="archive-title">'. $archives->title .'</h3><p class="archive-date">'.date('F jS ',$archives->created).'</p></a>';
                    endwhile;
                    
                    echo $output;
                ?></code>
登入後複製
登入後複製

但是不能分頁,請問如何分頁呢?

什麼樣的分頁?

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!