By applying your MyListFiles method within the context of your DTML Document
you are asking for files that are contained by your DTML Document and there
are none. By 'viewing' your method in the management interface you are
applying your method within the context of the folder that contains it, and
that folder apparently contains file's. If you want to use your method
within a DTML Document with the very same result you could use for instance:

<dtml-in "PARENTS[0].objectValues('File')">

See also:
http://www.zope.org/Members/michel/HowTos/DTMLMethodsandDocsHowTo

Cornelis J. de Brabander
==========================================
Department of Education, Leiden University
P.O.Box 9555, NL-2300 RB Leiden
+31 71 527 3422/3401
[EMAIL PROTECTED]
==========================================

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Koch
> Marc
> Sent: woensdag 3 januari 2001 12:16
> To: '[EMAIL PROTECTED]'
> Subject: [Zope] objectValues Question
>
>
> Hi,
>
> I'm new to Zope and while 'playing' around I wondered about the following:
>
> I've created a DTML method (called MyListFiles) that lists the 'File'
> objects contained in a folder:
>
> <ul>  <dtml-in "objectValues('File')">   <li><a href="<dtml-var
> absolute_url>"><dtml-var id></a></li>  </dtml-in> </ul>
> This works as expected when I run it using the 'View' tab.
>
> Now when I create a DTML document and call this method like this:
>
> <dtml-var MyListFiles>
>
> it produces no output.
>
> Why?
>
>
> Thank You for any help
>
> ---------------------
>
> Un courrier électronique n'engage pas son émetteur. Tout message
> susceptible de comporter un engagement doit être confirmé par un
> écrit dûment signé.
>
> An electronic message is not binding on its sender. Any message
> referring to a binding engagement must be confirmed in writing
> and duly signed.
>
> Ein elektronischer Brief bzw. eine elektronische Nachricht ist
> für den Absender nicht verbindlich. Jede Nachricht,  welche eine
> Verpflichtung beinhaltet, muß schriftlich bestätigt und
> ordnungsgemäß unterzeichnet werden.
>
> ---------------------
>
>
>
> _______________________________________________
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>



_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to