Customise Page Not Found (404)

By default we get a page like this when navigating to a bad URL:

We apologize for the inconvenience, but the page you were trying to access is not at this address. You can use the links below to help you find what you are looking for.

If you are certain you have the correct web address but are encountering an error, please contact the 
                        Site Administration.

Thank you.

You might have been looking for…
News Site News
Events Site Events
Users Site Users

How to customise the format and content of this page?

Thanks.

I do not have the answer for your question, but maybe a hint how you can find out yourself: recursively search Plone's source tree for significant portions of the page (e.g. "bad URL"). It is quite likely, you find it in a localization (=translation) file; in this case, the translation is associated with a "message id". Search for it and you should find the page source. Once you have identified the source, read in the Plone documentation how to customize it.

It is defined in the error_message.pt template. And this is the corresponding browser view.

You could customize it using z3c.jbot.

2 Likes

Thanks a lot!
I am thinking to use z3c, the docs you point to specify Plone 4, is z3c Plone 5 compatible?

Yes, z3c.jbot can be used with Plone 5.