[Zope] Re: Preserving Context
Javier Subervi
javier_subervi at yahoo.com
Tue Dec 12 16:57:38 EST 2006
----- Original Message ----
From: Maciej Wisniowski <maciej.wisniowski at coig.katowice.pl>
>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?
return 0
catalog = ''
try:
catalog = getattr(context, context.superValues('ZCatalog')[0].id)
except AttributeError:
pass
if catalog:
return 1
>I'm not sure what exactly is your case but you may try:
>
><div align="center"
> tal:condition="here/hasSearchEngine(here/aq_inner)">
>
>or just (without passing a parameter):
>
><div align="center"
> tal:condition="here/aq_inner/hasSearchEngine()">
None of that worked :( The latter gave me the same as without passing "aq_inner", while the former threw errors based on syntax.
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/337d99d9/attachment.htm
More information about the Zope
mailing list