<div class="post-ccc" id="post-<?php $this->cid(); ?>">
<div class="clear"></div>
<div class="entry">
<?php
$this->widget('Widget_Contents_Post_Recent', 'pageSize=10000')->to($archives);
$year = 0; $i = 0;
$output = '<div class="post-cc">';
while ($archives->next()):
$year_tmp = date('Y', $archives->created);
if ($year != $year_tmp && $year > 0) {
$output .= '</div>'; // 结束上一个年份的div
}
if ($year != $year_tmp) {
$year = $year_tmp;
$output .= '<h3>' . $year . ' 年</h3><div class="year-content">'; // 开始新的年份div
}
$month_tmp = date('m', $archives->created);
$day_tmp = date('d', $archives->created);
$output .= '<div class="month-day-title">' . $month_tmp . '月' . $day_tmp . '日: <a href="' . $archives->permalink . '">' . $archives->title . '</a></div>';
endwhile;
if ($year > 0) {
$output .= '</div>'; // 结束最后一个年份的div(如果有的话)
}
$output .= '</div>'; // 结束post-cc的div
echo $output;
?>
<div class="clear"></div>
</div>
</div>
评论区(暂无评论)
本站使用 Cookie 技术保留您的个人信息
暂无评论,快来抢沙发吧~
