Fix example yml config file.
[blog.pm.git] / templates / src / default / post / archive.tt2
blob256004a0d0aa00256b543ccd079cfee669d778f9
1 [% posts = c.model('Post').archive(year,month,day) %]
3 [% UNLESS posts.size; year = ''; month = ''; day = ''; END %]
5 [% helper_util = c.helper('Util') %]
7 [% WRAPPER 'include/corners' %]
8 <h2 class="title"><a href="[% uri_post_list() %]">[% c.loc('Blog')
9     %]</a> &larr; 
10 [%- IF year -%]    
11     <a href="[% uri_post_archive() %]">[% c.loc('Archive') %]</a> &larr;
12     [%- IF month -%]
13     <a href="[% uri_post_archive(year) %]">[% year %]</a> &larr;
14         [%- IF day -%]
15         <a href="[% uri_post_archive(year, month) %]">[%
16             helper_util.mon2name(month - 1) %]</a> &larr;
17         [% day %]
18         [%- ELSE -%]
19         [% helper_util.mon2name(month - 1) %]
20         [%- END -%]
21     [%- ELSE -%]
22     [% year %]
23     [%- END -%]
24 [%- ELSE -%]
25     [% c.loc('Archive') %]
26 [%- END -%]
27 </h2>
29 [% FOREACH entry IN c.model('Post').archive_month_list %]
30 [% IF loop.first %]<ul>[% END %]
31 <li><a href="[% uri_post_archive(entry.year) %]">[% entry.year
32     %]</a>, <a href="[% uri_post_archive(entry.year, entry.month)
33     %]">[% entry.month_name %]</a> ([% entry.count %])</li>
34 [% IF loop.last %]</ul>[% END %]
35 [% END %]
37 [% END %]
39 [% PROCESS 'post/list.tt2' %]