[Zope] Re: Preserving Context

Javier Subervi javier_subervi at yahoo.com
Tue Dec 12 14:29:56 EST 2006


From: Jonathan <dev101 at ...>

>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 variable (in REQUEST namespace) 
>that contains ['folderB', 'folderC'].  Note: this will not work if there are any other >scripts, DMTL methods etc in the URL after 'scriptA'.

I figured out what I was doing wrong. Apparently, the script needs to be called *before* the folders. I had put it at the end. Okay, that works, so now how do I incorporate it? I'm running into trouble here. I've rewritten the following line several times, and several times gotten it wrong. Perhaps you could steer me right?

<div align="center" 
       tal:define="mycontext python:`here.traverse_subpath`"
       tal:condition="here/hasSearchEngine(mycontext)">

TIA,
Javier




 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20061212/db163c6d/attachment.htm


More information about the Zope mailing list