<%init>
$r->content_type('text/html; charset=utf-8');
Jifty->web->handle_request();

if ($m->base_comp->path =~ m|/_elements/|) {
    # Requesting an internal component by hand -- naughty
    $m->redirect("/errors/requested_private_component");
#} elsif (not Jifty->web->current_user->id and $m->request_comp->path !~ m{^/(?:welcome|dhandler|css|js|images|validator\.xml)} ) {
#    # Not logged in, trying to access a protected page
#    $m->notes->{'login-nextpage'} =  $m->{top_path};
#    Jifty->web->redirect('/welcome/');
}
$m->comp('/_elements/nav');
$m->call_next();
return;
</%init>
<%def .setup_actions>
<%init>
Jifty->web->allow_actions(qr/.*/);
# this method turns around and calls the setup_actions method 
# it's called by Jifty::Web->setup_page_actions.
my $delegate = $m->fetch_comp($m->next_comp->path);
if ($delegate and $delegate->method_exists('setup_actions')) {
    $delegate->call_method('setup_actions');
}

</%init>
</%def>
