my $page = param('p');
my $tmpl = HTML::Template::Compiled->new(filename => '../templates/main.tmpl');
my %content;
my @pages = qw(home me friends hobbys blog gb snippets projekte linktips impressum);
@content{@pages} = 1;
if(exists $content{$page}){
$tmpl->param(content => "../templates/".$page}.".tmpl");
}
else{
$tmpl->param(content => "../templates/home.tmpl");
}