[ZPT] Page Template as standard_error_message

Francis Potter francis@meadowbase.com
Sun, 23 Sep 2001 12:35:48 -0700


Hmmm, after sending this message I realize that it's only a problem if
the metal:use-macro attribute is on the <html> tag or any tag outside
the <html> tag. I can get the desired effect by placing it on <span>
tags right within the <html> tags.

I'm not sure that's logical behavior, but it's an acceptable workaround.

Is there some reason why metal:use-macro shouldn't appear on the html
tag on most pages? Until I hit this problem, that seemed like the best
place for it in many cases.

--- 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 Francis Potter
> Sent: Sunday, September 23, 2001 1:22 AM
> To: 'ZPT Mailing List'
> Subject: RE: [ZPT] Page Template as standard_error_message
>=20
>=20
>=20
> Evan, etc. --
>=20
> I've never tried to redefine standard_error_message but when=20
> I saw this
> post I thought I'd give it a try.
>=20
> 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=20
> ZPT inserted
> into the hard-coded "Site Error" message, in between the=20
> 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:
>=20
> <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>
>=20
> Any thoughts?
>=20
> --- Francis Potter
> --- desk +1 (415) 826 3646
> --- cell +1 (415) 310 5162
> --- AIM heliumfrancis
>=20
>=20
> > -----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
>=20
>=20
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt
>=20