% if ($wiki) { % } % if ($page) { % }
<& header.mas, %ARGS, request_comp => $m->request_comp() &>
<& .messages &> % if ( $m->request_comp()->attr('show_title') ) { <& SELF:page_title, %ARGS &> % } % $m->call_next();
% if ($show_sidebar) { <& sidebar.mas, %ARGS &> % }
<& footer.mas, %ARGS &>
<%args> $wiki => undef $page => undef <%init> my $show_sidebar = $m->request_comp()->attr('show_sidebar'); <%attr> show_title => 1 show_sidebar => 1 sidebar => [] <%def .messages>
% for my $msg (@messages) {

<% $msg %>

% }
<%init> my @messages = $c->session_object()->messages(); return unless @messages; <%method page_title>

<& SELF:title, %ARGS &>