Re: Customizing the Zope 404 page
Laurence Rowe <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <CAOycyLTFoB2B+C6vmO2CSWWMOB+VOu9Cfy2PBO-=3Kq4XK4dRA@mail.gmail.com> |
On 2 June 2014 17:02, Elizabeth Leddy <[email protected]> wrote: > Greetings Ploners! > > I have been digging in very, very deep dark zope code and was wondering if > anyone knows or has a link on how to customize Zope’s 404 page? This is > super helpful for hosting many plone sites in one zope instance and the > current not found doesn’t even have the right page type. > I think you can register an exception view too. I can't find an example for this but the code looking them up is here: https://github.com/zopefoundation/Zope/blob/41c2220b9aa5727367760dd7d34e4b342d6c2d11/src/Zope2/App/startup.py#L241 and this code here: https://github.com/zopefoundation/Zope/blob/41c2220b9aa5727367760dd7d34e4b342d6c2d11/src/Zope2/App/tests/testExceptionHook.py#L298 Ah, here it is, from http://old.zope.org/Products/Zope/2.11.2/CHANGES.txt/ - Zope 3-based exception views can now be registered in ZCML for various exceptions that can be raised by Zope. Registering an exception view can be done like this: <browser:page for="zope.publisher.interfaces.INotFound" class=".view.SomeView" name="index.html" permission="zope.Public" /> Laurence ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Plone-developers mailing list Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/plone-developers