typecho归档页面如何分页

WBOY
Libérer: 2016-10-10 11:55:59
original
2069 Les gens l'ont consulté

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="'.%24archives->permalink%20.'"><h3 class="archive-title">'. $archives->title .'</h3>
<p class="archive-date">'.date('F jS ',$archives->created).'</p></a>';
                    endwhile;
                    
                    echo $output;
                ?></code>
Copier après la connexion
Copier après la connexion

但是不能分页,请问如何分页呢?

回复内容:

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="'.%24archives->permalink%20.'"><h3 class="archive-title">'. $archives->title .'</h3>
<p class="archive-date">'.date('F jS ',$archives->created).'</p></a>';
                    endwhile;
                    
                    echo $output;
                ?></code>
Copier après la connexion
Copier après la connexion

但是不能分页,请问如何分页呢?

什么样的分页?

Étiquettes associées:
source:php.cn
Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Tutoriels populaires
Plus>
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!