Re: [Zope] Re: Preserving Context

2006-12-13 Thread Maciej Wisniowski
Yes there is a 'return 0' at the beginning. This code always executes and works just fine, as I've mentioned before, as long as the template is in the root folder of the given Web site. I'm trying to put this template in a root folder that services all the Web sites of the portal, and

Re: [Zope] Re: Preserving Context

2006-12-13 Thread Javier Subervi
- Original Message From: Maciej Wisniowski [EMAIL PROTECTED] So this is not because of this code. Your script ALWAYS returns '0' and does nothing more. Just try to remove everything after 'return 0' and see if it changes anything or remove 'return 0' and see what happens then. Crap.

Re: [Zope] Re: Preserving Context

2006-12-12 Thread Jonathan
In your root folder you could have a script that accesses the ZCatalog which can be called from any subfolder and can tell where it was called from... try the following: create a python script (tst) in your root folder that contains the following code: return str(traverse_subpath) then

Re: [Zope] Re: Preserving Context

2006-12-12 Thread Jonathan
The script routine doesn't have to be located in root. traverse_subpath is populated using the names of all subfolders that occur after the script file name in the URL. So if your URL is: http:/my.web.site/folderA/scriptA/folderB/folderC, then scriptA will receive a traverse_subpath

Re: [Zope] Re: Preserving Context

2006-12-12 Thread Maciej Wisniowski
As far as I understand you have script (say it has id 'handle_404_scr') that handles 404 errors in 'root' folder. In this script you have something like: div align=center tal:define=mycontext here tal:condition=here/hasSearchEngine(mycontext) Yes? So how is this script called? I'm

Re: [Zope] Re: Preserving Context

2006-12-12 Thread Jonathan
- Original Message - From: Javier Subervi To: zope@zope.org Sent: Tuesday, December 12, 2006 2:29 PM Subject: [Zope] Re: Preserving Context The script routine doesn't have to be located in root. traverse_subpath is populated using the names of all subfolders that occur after the