[ZPT] Page Template as standard_error_message
Francis Potter
francis@meadowbase.com
Sun, 23 Sep 2001 01:21:56 -0700
Evan, etc. --
I've never tried to redefine standard_error_message but when I saw this
post I thought I'd give it a try.
It works fine if my standard_error_message ZPT doesn't contain any
metal:use-macro attributes. As soon as I do that, I get my ZPT inserted
into the hard-coded "Site Error" message, in between the error type and
the Troubleshooting suggestions. Obviously I just want my ZPT, without
the other stuff at the top and bottom! Here's the ZPT:
<html metal:use-macro=3D"here/html_shell/macros/shell">
<head />
<body>
<span metal:fill-slot=3D"main">
<span class=3D"heading">Sorry!</span><br/><br/>
The server made a mistake.<br/>
Please use the navigation on the left to go to a new section of the
site.<br/>
Thanks.<br/><br/>
<span class=3D"small" tal:on-error=3D""
tal:content=3D"options/error_type"/><br/>
<span class=3D"small" tal:on-error=3D""
tal:content=3D"options/error_message"/><br/>
</span>
</body>
</html>
Any thoughts?
--- Francis Potter
--- desk +1 (415) 826 3646
--- cell +1 (415) 310 5162
--- AIM heliumfrancis
> -----Original Message-----
> From: zpt-admin@zope.org [mailto:zpt-admin@zope.org] On=20
> Behalf Of Evan Simpson
> Sent: Friday, September 21, 2001 8:57 AM
> To: Lynn Walton
> Cc: ZPT Mailing List
> Subject: Re: [ZPT] Page Template as standard_error_message
>=20
>=20
> Lynn Walton wrote:
>=20
> > Evan, I've got zope 2.4.1 and can get a=20
> standard_error_message template
> > to work, but I can't access
> > error_message, error_type, etc I've tried various namespaces to no
> > avail. Can you explain how you're supposed to
> > access those?
>=20
>=20
> Through "options", like this:
>=20
> <html><head><title>Panic!</title></head>
> <body>
> <table border=3D"0" width=3D"100%">
> <tr valign=3D"TOP">
> <td>
> <h2>Big Bad Error</h2>
> <p>Zope has encountered a horrible error while=20
> publishing!!!!!!!!!!</p>
> <h4 tal:content=3D"options/error_type">Type</h4>
> <h4 tal:content=3D"options/error_value">Value</h4>
> <h4 tal:content=3D"options/error_message">Message</h4>
> </td></tr>
> </table>
> </body>
> </html>
>=20
> Cheers,
>=20
> Evan @ Zope
>=20
>=20
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt
>=20