Leser: 2
![]() |
|< 1 2 3 >| | ![]() |
22 Einträge, 3 Seiten |
perl -MCPAN -e "install Modul"
perl -MCPAN -e "install Modul"
1
2
3
4
5
6
7
8
9
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 = map { getkey($_) => "$_.tmpl" } @pages;
$tmpl->param(content => "../templates/$content{$page}");
%content = map { getkey($_) => "$_.tmpl" } @pages;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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");
}
$tmpl->param(content => "../templates/test.tmpl") unless $content{$page};
![]() |
|< 1 2 3 >| | ![]() |
22 Einträge, 3 Seiten |