% use Mojo::DOM; % use Mojo::Util; % % use BurguillosInfo::Posts; % % layout 'default', current_slug => $current_category->{slug}; % title $current_category->{title};

<%= $current_category->{title} %>

<%== $current_category->{description} %>

Artículos

% my ($cached_posts_by_category) = BurguillosInfo::Posts->new->Retrieve; % my $category_post = $cached_posts_by_category->{$current_category->{slug}}; % if (defined $category_post) { % for my $post (@$category_post) {

<%=$post->{title}%>

% my $xml = Mojo::DOM->new($post->{content}); % my $text = $xml->all_text; % if (length($text) > 120) { % $text = substr($text, 0, 100).'...'; % }

<%=$text%>

Escrito por <%=$post->{author}%>

% } % } else {

Parece que aun no hay artículos.

% }