New Message: Re: How to impliment a custom page not found page.
webmaster at userland.com
webmaster at userland.com
Tue Aug 16 20:22:44 CDT 2005
A new message was posted:
Address: http://manila.userland.com/discuss/msgReader$1221
By: Steve Hooker (steve at cybersaps.com)
The place to set your 404 page is in the myFirstManilaSite's #objectNotFound handler. Otherwise known as Samuel Reynolds' ObjectNotFoundHandler. Read his tutorial.
Here's the one I use on all my sites.
local {
pta = html.getPageTableAddress()};
on fourOhFour () {
pta^.title = "404: Sorry - Page Not Found";
pta^.template = string (pta^.adrSiteRootTable^.["#template"]);
local {
htmlText = manilaSuite.unTaint (pta^.path)}; //no curly brace macros in this text
return ("404
We're sorry, the page *" + htmlText + "* was not found.
You may have mis-entered the URL. If not, you may be able to find the information you want via the navigation to the left or via the search form below.
" + manilaMacros.relativeLink ("Search", "/search/"))};
try {
s = manilaSuite.hierarchyPage ();
if pta^.code == 404 {
fourOhFour ()}
else {
return (s)}}
else {
if tryError beginsWith "!" { \// custom error or redirect message
scriptError(tryError)}
else {
fourOhFour ()}}
This is a Manila site.. http://manila.userland.com/.
More information about the Manila-Users
mailing list