Am 17.07.2010 um 23:23 schrieb Justin Ryan:
> Howdy..
> 
> I'm trying to override Unauthorized errors with a page, ideally a
> login page, but for now I'm just trying to get a template which says
> "Login required" to load.
> 
> In a default bluebream paster project, I added the following ZCML:
> 
>  <browser:page
>     for="zope.exceptions.IUnauthorized"
>     name="index"
>     permission="zope.Public"
>     template="unauth.pt"
>     />
> 
> Of course, there's an unauth.pt which, again, just says "Login
> Required" for now.

Maybe your declaration is missing the layer definition. When your application 
uses a specific skin you have to declare it in the ZCML statement otherwise the 
page is registered for zope.publisher.interfaces.browser.IDefaultBrowserLayer. 
See [1] for a package defining custom error views in its browser package.

The name of your view differs from the one in the wiki you mentioned. I'm not 
sure whether it is required to be "index.html"


[1] .. http://pypi.python.org/pypi/z3c.layer.pagelet


Yours sincerely,
-- 
Michael Howitz · m...@gocept.com · software developer
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Zope and Plone consulting and development

_______________________________________________
bluebream mailing list
bluebream@zope.org
https://mail.zope.org/mailman/listinfo/bluebream

Reply via email to