[Zope] stupid question

michael angelo ruberto michaelangelo@webmind.com
Tue, 6 Mar 2001 18:17:34 -0500


disregard the last message - i was being stupid. i thought this was working
but it wasn't
<dtml-if _['sequence-item'].objectValues(['File'])>

back to the drawing board. ;)

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
michael angelo ruberto
Sent: Tuesday, March 06, 2001 5:57 PM
To: Jonothan Farr
Cc: zope
Subject: RE: [Zope] stupid question


this is quite strange. i can get this to work if i remove the <dtml-var
meta_type> tag.

<ul>
      <dtml-in expr="PARENTS[0].objectValues(['File','DTML Document'])">
        <dtml-if _['sequence-item'].objectValues(['File'])>
        <li><a href="<dtml-var absolute_url>"><dtml-var id></a> <dtml-var
getContentType></li>
        <dtml-else>
        <li><a href="<dtml-var absolute_url>"><dtml-var id></a> <dtml-var
meta_type></li>
        </dtml-if>
      </dtml-in>
    </ul>

for some reason the meta_type method overrides the getContentType method if
they are both used.

????

-----Original Message-----
From: Jonothan Farr [mailto:jfarr@real.com]
Sent: Tuesday, March 06, 2001 5:37 PM
To: michaelangelo@webmind.com
Cc: zope
Subject: Re: [Zope] stupid question


Python doesn't like the "sequence-item.getContentType()" part. Try:
"_['sequence-item'].getContentType()"

--jfarr

----- Original Message -----
From: "michael angelo ruberto" <michaelangelo@webmind.com>
To: <zope@zope.org>
Sent: Tuesday, March 06, 2001 2:26 PM
Subject: [Zope] stupid question


> hi,
>
> why doesn't this work?
>
>
>              <dtml-if sequence-item.objectValues(['File'])>
>              <td bgcolor="#EEEEEE"><dtml-let
> cType="sequence-item.getContentType()"><dtml-var cType></dtml-let></td>
>              <dtml-else>
>              <td bgcolor="#EEEEEE"><dtml-var meta_type></td>
>              </dtml-if>
>
>
> is there some other way to display the content type of a file?
>
> thanks
>
> -<mike>-
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> 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  -  Zope@zope.org
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 )