[Zope] Re: Preserving Context
Javier Subervi
javier_subervi at yahoo.com
Tue Dec 12 11:55:52 EST 2006
From: Jonathan <dev101 at ...>
&&
From: Suresh V <suresh_vv at ...>
>In your script you could access the catalog as follows:
>
> afolder = context.restrictedTraverse('folderA/folderB/'+someLocalFolder) # pass 'someLocalFolder' as a parameter
> catalog = afolder.Catalog # assuming you have named your ZCatalog 'Catalog'
The problem with this, is that this script is used at the base of a portal with several different Web sites, therefore, the root folder of each is different.
>And where is mycontext defined? You will need a tal:define="mycontext here" or something.
I added the following:
<div align="center"
tal:define="mycontext here"
tal:condition="here/hasSearchEngine(mycontext)">
...but that didn't seem to help any:
Error Type: KeyError
Error Value: 'hasSearchEngine(mycontext)'
Concerning your comment about the except, this script was written by an employee of mine. I'm now picking up where he left off. I cleaned it up ;)
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/0afe857c/attachment.htm
More information about the Zope
mailing list