% if ( $m->comp_exists ("/comps/$prj/header.msn") ) { <& "/comps/$prj/header.msn", alias => 'main' &> % } else { <& "/comps/header.msn", alias => 'main' &> % }
% ### Футер % ############################################## % if ( $m->comp_exists ("/comps/$prj/footer.msn") ) { <& "/comps/$prj/footer.msn" &> % } else { <& "/comps/footer.msn" &> % } % ### /Футер <%args> $id => undef %args> <%init> &abort404 if $id && $id =~ /\D/; my $prj = $request->{project}; my $profile = $request->{project_profile}; my $root = $request->{project_section}; my $doc = $keeper->get_document_by_id ( $id, class => 'promosuite::Postcard', status => 1, light => 1, ) if $id; $m->redirect("./") if $id && !ref $doc; %init>