<?php $this->widget('Widget_Contents_Post_Recent', 'pageSize=10000')->to($archives);
    $year=0; $mon=0; $i=0; $j=0;
    $output = '<div class="wrapper">';
    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 .= '</div></div>';
        if ($year != $year_tmp && $year > 0) $output .= '</div>';
        if ($year != $year_tmp) {
            $year = $year_tmp;
            $output .= '<h1>'. $year .' 年</h1><div>'; //输出年份
        }
        if ($mon != $mon_tmp) {
            $mon = $mon_tmp;
            $output .= '<div><div><h4>'. $mon .' 月</h4><ul>'; //输出月份
        }
        $output .= '<li>['. $mon. date('.d] ',$archives->created).'<a href="'.$archives->permalink .'">'. $archives->title .'</a> </li>'; //输出文章日期和标题
    endwhile;
    $output .= '</ul></div></div></div></div>';
    echo $output;
?>