Subject: Re: [Zope] path...
From: "After Dark" <[email-masked]>
To: Casey Duncan <[email-masked]>
Date: Thu, 05 Apr 2001 13:17:09 -0400

Well, probably I`m trying in the hardest way... And I
already read the book ch3... what I want to do is to list
directories. The problem is that the document that list is
in a directory below of the directories to list.

I tryed many diferent ways, but all I could do was list some
directories, but when I tryed to list the subdirectory of
the subdirectory of...., didn`t work.

Take a look at my code:

<dtml-if "REQUEST.has_key('parametro')==1">

<dtml-call "REQUEST.set('base',_.getitem(base+'.'+parametro))">
"<dtml-var base>"

<table>
<dtml-with base>
<dtml-in objectItems>
   <td>
   <dtml-if "meta_type=='Folder'">
     <IMG SRC="../imagens/Folder_icon.gif">
     <td><a href="arvore_dtml?base=<dtml-var
base>&parametro=<dtml-var id>"><dtml-var id></a>
   <dtml-else>
     <IMG SRC="../imagens/iconImage.jpg">
     <td><dtml-var id>
   </dtml-if>
  </tr>
</dtml-in>
</dtml-with>
</table>

Thanks...

On Thu, 05 Apr 2001 09:39:30 -0600
Casey Duncan <[email-masked]> wrote:
>After Dark wrote:
>> 
>> What you said makes very much sense, I liked that. :)
>> But....
>> 
>> I tryed this and didn`t work again. :~(
>> 
>> <dtml-call "REQUEST.set('base',_.getitem('MedSaude.sintoma'))">
>> <dtml-with base>
>> 
>> Error: trying to reference a nonexisting....
>> 
>> It seems to me that nothing works.. :~~(
>> Help!!
>> 
>> Bye.
>> 
>
>You can only pass the name of a single object to getitem.
>If you wish to
>pass the parent object, you need to do two separate
>getitems like:
>
><dtml-with expr="_.getitem('MedSaude')">
>    <dtml-call "REQUEST.set('base',_.getitem('sintoma'))">
></dtml-with>
>
>If I may, what is the reason for this arbitrary object
>retrieval? I
>sense there is an easier way to accomplish what you need
>with jumping
>through these hoops.
>-- 
>| Casey Duncan
>| Kaivo, Inc.
>| [email-masked]
>`------------------>

________________________________________________
Don't E-Mail, ZipMail! http://www.zipmail.com/