Re: [Zope] Preserving Context

2006-12-17 Thread Dieter Maurer
Javier Subervi wrote at 2006-12-11 00:41 -0800:
>I have a page template which I use to catch and customize 404 errors. In that 
>page, I call a script that offers site navigation.

This is quite a difficult situation:

  In case of 404 errors, you may not yet have reached the final destination
  (as something in the url is problematic -- and the problem does not
  need to be at the url's end).


Within the restrictions of the problem sketched above (only very high
intelligence can try to overcome them), I would approach your case
in the following way:

  Have a trivial script in each context where you are interested
  in special treatment of 404 errors.
  As the script is trivial, there is no problem, in having
  a separate copy in each context.

  The trivial script determines the error context and
  then calls your centralized (non-trivial) script passing
  in the determined context.
  

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Preserving Context

2006-12-11 Thread Javier Subervi
Hi;
I have a page template which I use to catch and customize 404 errors. In that 
page, I call a script that offers site navigation. Since I have several sites 
within a portal, I decided to move all common elements (such as this page) to a 
central "root" location from which all sites could draw. However, when I did 
that, this page returned the navigation of that "root" dir! That's not what I 
want, of course. How do I preserve context for the called script, such that 
when the page is called, it passes the context from where it was called to the 
script in question?
TIA,
Javier




 

Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )