[Zope] dtml-if question
Oops Oops
oops_am@yahoo.com
Wed, 27 Jun 2001 17:27:06 -0700 (PDT)
Thank you Casey :)
I got it work.
here is the code
<dtml-if expr="objectIds('tbContainer')==[]">
<dtml-var tbContainer_addForm>
</dtml-if>
--- Casey Duncan <cduncan@kaivo.com> wrote:
> Oops Oops wrote:
> >
> > I guess i did something wrong on this, so it's not
> > work?
> >
> > <dtml-if expr="objectValues('newclient')==''">
> > <br> Null
> > <dtml-else>
> > <br> Not Null
> > </dtml-if>
> >
> > My idea is to test if Zobject-newclient exist in
> this
> > folder or not.
> > But i always get "Not Null" even tho I'm sure
> there is
> > no newclient exist in the folder.
> >
> > Can someone help me to fix this?
> >
> > Thanks
> >
>
> ObjectValues returns a list of objects optionally
> filtered by meta_type.
> To test for the existence of an id in a folder, the
> best way is
> probably:
>
> <dtml-if expr="'newclient' in folder.objectIds()">
> ...
> </dtml-id>
>
> Which will return true if 'newclient' is in the list
> of object ids for
> the folder (you can omit the folder designation to
> refer to the current
> folder, however if won't work without it if you code
> this in a DTML
> document).
>
> hth,
> --
> | Casey Duncan
> | Kaivo, Inc.
> | cduncan@kaivo.com
> `------------------>
>
> _______________________________________________
> 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 )
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/