1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| <div class="timeline-page"> <!-- 修改以后的命令 --> <?php $this->widget('Widget_Contents_Post_Recent', 'pageSize=10000')->to($archives); $year=0; $mon=0; $i=0; $j=0; while($archives->next()): $year_tmp = date('Y',$archives->created); $mon_tmp = date('m',$archives->created); $y=$year; $m=$mon; if ($mon != $mon_tmp && $mon > 0) $output .= '</ul>'; if ($year != $year_tmp && $year > 0) $output .= '</div>'; if ($year != $year_tmp) { $year = $year_tmp; $output .= '<div class="timeline"><span class="year">'. $year .'</span>'; } if ($mon != $mon_tmp) { $mon = $mon_tmp; $output .= '<ul class="event"><span class="month">'. $mon .'月</span>'; } $output .= '<li><span class="date">'.date('d日 ',$archives->created).'</span><a href="'.$archives->permalink .'">'. $archives->title .'</a></li>'; endwhile; echo $output; ?> <!-- 修改以后的命令 --> </div>
|