[Zope] Directories and subdirectories....
After Dark
afterz@zipmail.com
Mon, 02 Apr 2001 09:16:07 -0400
Hi.
I did what you said,and everything worked, unless that zope
don`t recognize the subfolder like an object. Even using a
dtml-method and changing the expression, like you told me,
it only works with the root folders.
I tried (just to test) to do this:
<dtml-in "rootfolder/subfolder.objectVlues()">
</dtml-in>
and gives error of: trying to reference a nonexisting object
or variable.
I looked at the books, but I couldn`t solve it. Can you
help?
Thanks.
On Fri, 30 Mar 2001 23:00:54 +0200 (CEST)
Dieter Maurer <dieter@handshake.de> wrote:
>After Dark writes:
> > >
> > > "_.getitem('parameter')" is equivalent to
>"parameter".
> >
> > parameter come from a form(REQUEST), so if I don`t do
>that
> > zope will treat it like a string.
>But then, you must omit the '...'!
>
>Believe me:
> "_.getitem('parameter')" is equivalent to
>"parameter".
>
>
>Thus, you should use:
>
> "_.getitem(parameter).objectValues()"
>
> > >Otherwise, your statement is strange.
> > >
> > > What object type contains the "dtml-in" (a DTML
>Method
> > >or Document)?
> >
> > Dtml Document.
>That may explain why you get a wrong object:
>
> A DTML Document brings with it its own context
> and this context is stronger than that of the
> call.
>
> If you have
>
> /parameter
> /document
> /subfolder
> /parameter
>
> and you use the URL "/subfolder/document", you will get
> "/parameter" and not "/subfolder/parameter".
>
> A DTML Method, on the other hand, does not bring its own
> context. I only uses that of the call.
>
> Check out
>
> URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html
>
> for details.
>
>
>
>Dieter
________________________________________________
Don't E-Mail, ZipMail! http://www.zipmail.com/