% if ( $m->comp_exists ("/comps/$prj/header.msn") ) { <& "/comps/$prj/header.msn" &> % } else { <& "/comps/header.msn" &> % } % ### контент
<% $section->name %>
% if ( ref $document && $document->html ) {
%# <% $document->html %>
%# % }
% foreach my $doc ( @$documents ) { % my $img = $doc->get_image ('picture'); % my $mini = $img->{mini}->{'100x100'};
\ % if ( exists $mini->{filename} && $mini->{filename} ) {
<% $doc->name %> % }
% }
% ### Футер % ############################################## % if ( $m->comp_exists ("/comps/$prj/footer.msn") ) { <& "/comps/$prj/footer.msn" &> % } else { <& "/comps/footer.msn" &> % } % ### /Футер <%args> $id => undef <%init> my $prj = $request->{project}; my $profile = $request->{project_profile}; my $root = $request->{project_section}; &abort404 if $id && $id !~ /^\d+$/; my ($section) = $keeper->get_sections ( s => $root->id, class => 'promosuite::PromoSection', limit => 1, status => 1, ); my ($documents, $document); if ( ref $section ) { if ( $id ) { $document = $keeper->get_document_by_id ($id, s => $section->id, class => 'promosuite::Promoblock', status => 1, ); } $documents = $keeper->get_documents ( s => $section->id, class => 'promosuite::Promoblock', status => 1, order => ['date', 'direct'], return_mode => 'array_ref', ); $document = shift @$documents if !$document && @$documents; }