diff options
author | Yorhel <git@yorhel.nl> | 2008-11-09 11:35:21 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2008-11-09 11:35:21 +0100 |
commit | 4fa5a71546b7475ebaa4698e07a20918ac381641 (patch) | |
tree | c0ec573d5ddbca811cb89fe6bc56812dd4af8b0f /util/vndb.pl | |
parent | ebd40d31732d395e627244a176e01bc72106156c (diff) |
Custom 404 page
...because the default YAWF 404 page is rather ugly
Diffstat (limited to 'util/vndb.pl')
-rwxr-xr-x | util/vndb.pl | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/util/vndb.pl b/util/vndb.pl index c1810148..d7269bb4 100755 --- a/util/vndb.pl +++ b/util/vndb.pl @@ -16,7 +16,7 @@ use lib $ROOT.'/yawf/lib'; use lib $ROOT.'/lib'; -use YAWF; +use YAWF ':html'; our(%O, %S); @@ -31,6 +31,7 @@ YAWF::init( namespace => 'VNDB', object_data => \%S, pre_request_handler => \&reqinit, + error_404_handler => \&handle404, ); @@ -39,3 +40,18 @@ sub reqinit { $self->authInit; } + +sub handle404 { + my $self = shift; + $self->htmlHeader; + div class => 'mainbox'; + h1 'Page not found'; + div class => 'warning'; + h2 'Oops!'; + p "It seems the page you were looking for does not exists,\n". + "you may want to try using the menu on your left to find what you are looking for."; + end; + end; + $self->htmlFooter; +} + |