[Zope] path...

After Dark afterz@zipmail.com
Thu, 05 Apr 2001 13:18:02 -0400


This is a multi-part MIME message

--_===2998444====zipmail.com===_
Content-Type: text/plain
Content-Transfer-Encoding: 8bit




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


--_===2998444====zipmail.com===_
Content-Type: message/rfc822

From: "After Dark" <afterz@zipmail.com>
Subject: Re: [Zope] path...
To: Casey Duncan <cduncan@kaivo.com>
X-Mailer: CommuniGate Pro Web Mailer v.3.3.2
Date: Thu, 05 Apr 2001 13:17:09 -0400
Message-ID: <web-2998412@zipmail.com>
In-Reply-To: <3ACC91B2.7DBE7EDA@kaivo.com>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

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 <cduncan@kaivo.com> 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.
>| cduncan@kaivo.com
>`------------------>

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


--_===2998444====zipmail.com===_--