package Triple::Init;
+use constant {
+ STATIC_PAGE => 0,
+ DYNAMIC_PAGE => 1,
+ REDIRECT_PAGE => 2,
+
+ PAGE_TYPE => 0,
+ PAGE_TT => 1, PAGE_TO => 1,
+ PAGE_TITLE => 2,
+ PAGE_DESCRIPTION => 3,
+};
+
sub init {
my $sitename = sitename();
debug($sitename);
};
foreach my $key (keys %Triple::page) {
my @set = @{$Triple::page{$key}};
- next if $set[Triple::PAGE_TYPE] != Triple::STATIC_PAGE;
+ next if $set[PAGE_TYPE] != STATIC_PAGE;
syslog("info", "Marking Static '$key'");
$vars->{"uri"} = "$key";
- $vars->{"title"} = "$set[Triple::PAGE_TITLE]";
- $vars->{"description"} = "$set[Triple::PAGE_DESCRIPTION]";
+ $vars->{"title"} = "$set[PAGE_TITLE]";
+ $vars->{"description"} = "$set[PAGE_DESCRIPTION]";
syslog("info", $vars->{"uri"} . " " . $vars->{"title"} . " " . $vars->{"description"});
my $x = DYNAMIC_PAGE;
syslog("info", "important " . $x);
my $temporary;
- $template->process($set[Triple::PAGE_TT], $vars, \$temporary) or syslog("info", $template->error());
+ $template->process($set[PAGE_TT], $vars, \$temporary) or syslog("info", $template->error());
$static{$key} = $temporary;
}
}