[Zope] Re: newbie question: make reference to a 'foreign' variable
Sungmook Kim
dotorimook@yahoo.com
Sat, 8 Feb 2003 19:42:26 +0100 (CET)
Hi,
i have tried this too, but it gave me another error
message: AttributeError
<dtml-var "PARENTS[-1].GuestBook.addEntryAction">
what am i doing wrong?
--- "Michael R. Bernstein" <webmaven@lvcm.com>
schrieb: > On Sat, 2003-02-08 at 08:32, Sungmook Kim
wrote:
> > Hi,
> >
> > sorry, I meant the folder A is not a subfolder of
> B
> > but of some other folder X which is also a root
> folder
> > itself.
> >
> > -B
> > |
> > --variable(dtml method)
> > -X
> > |
> > -A
> > |
> > --dtml-document(here, i want to make a reference
> to
> > the variable in folder B)
>
> Ok, you seem to be using 'root folder' to mean 'a
> folder in the root
> folder'. There is onmly one root folder ('/').
>
> So your diagram should be:
>
> /
> +-B
> | +-variable
> |
> +-X
> +-A
> +-dtml-document
>
> So, the simple way to solve this is to start from
> the root folder and
> work your way down:
>
> <dtml-with "PARENTS[-1]">
> <dtml-with B>
> <dtml-var variable>
> </dtml-with>
> </dtml-with>
>
> "PARENTS[-1]" always get's you the root folder in
> Zope. This code will
> always get you variable-of-B-of-root, no matter
> where in the tree you
> call it from.
>
> --
> Michael R. Bernstein <webmaven@lvcm.com>
>
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de
Bis zu 100 MB Speicher bei http://premiummail.yahoo.de