« auto/share/dist/Rhetoric/widgets/sidebar/archives.pl
↑ Summary
auto/share/dist/Rhetoric/widgets/sidebar/cleanup.pl »
| 1 | use common::sense; | ||
| 2 | |||
| 3 | # category list | ||
| 4 | sub { | ||
| 5 | my ($self) = @_; | ||
| 6 | my $v = $self->v; | ||
| 7 | my $tt = $self->env->{tt}; | ||
| 8 | my $storage = $self->env->{storage}; | ||
| 9 | my $template; | ||
| 10 | my ($file, $dir, $suffix) = fileparse(__FILE__, '.pl'); | ||
| 11 | $template = $file; | ||
| 12 | $template =~ s/\d+_//; | ||
| 13 | $template .= ".html"; | ||
| 14 | my $out; | ||
| 15 | |||
| 16 | $v->{categories} = [ $storage->categories() ]; | ||
| 17 | $tt->process($template, $v, \$out); | ||
| 18 | $out; | ||
| 19 | } |