forked from HPR/hpr_generator
Configure root template page in config file
Currently the root template is page.tpl.html.
This commit is contained in:
@@ -55,7 +55,7 @@ sub main {
|
||||
read_config "site.cfg" => my %config;
|
||||
|
||||
my $tt = get_template_html($config{DBI});
|
||||
generate_page($tt, $config{correspondents}{navigation}, $config{correspondents}{content});
|
||||
generate_page($tt, $config{root_template}{content}, $config{correspondents}{navigation}, $config{correspondents}{content});
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -79,14 +79,14 @@ sub get_template_html (\%@) {
|
||||
|
||||
}
|
||||
|
||||
sub generate_page ($tt, $navigation, $content) {
|
||||
my ($tt, $navigation, $content) = @_;
|
||||
sub generate_page {
|
||||
my ($tt, $page, $navigation, $content) = @_;
|
||||
my $tt_vars = {
|
||||
navigation => $navigation,
|
||||
content => $content
|
||||
};
|
||||
|
||||
$tt->process('page.tpl.html', $tt_vars)
|
||||
$tt->process($page, $tt_vars)
|
||||
|| die $tt->error(), "\n";
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user