<% ref $section ? $section->name : 'NEWS' %>

% foreach my $doc (@news) {

<% $doc->name %>

% } <%args> $n => undef <%init> my $prj = $request->{project}; my $profile = $request->{project_profile}; my $root = $request->{project_section}; $n = $n || $profile->newsblock_count || 5; my @news; my ($section) = $keeper->get_sections ( s => $root->id, class => 'promosuite::NewsSection', status => 1, limit => 1, ); return unless ref $section; @news = $keeper->get_documents ( s => $section->id, class => 'promosuite::News', status => 2, limit => $n, order => [qw|date direct|], light => 1, ); return unless @news;