RE: [Zope] How to get the type of an object by dtml

2006-12-01 Thread Christian Steinhauer

 Could anyone help me.. how do I use DTML to return the type of the
object I'm currently working with?

If you want to get the html elements like b p input you should
have a look at javascript - document.getElementsByTagName(p)

you can cominate it with for or while loops or go directly to the objecs
document.getElementsByTagName(p)[0].firstChild.data = new;

- cs 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How to get the type of an object by dtml

2006-12-01 Thread Jonathan


- Original Message - 
From: Christian Steinhauer [EMAIL PROTECTED]

To: zope@zope.org
Sent: Friday, December 01, 2006 8:50 AM
Subject: RE: [Zope] How to get the type of an object by dtml





Could anyone help me.. how do I use DTML to return the type of the

object I'm currently working with?



I missed the beginning of this thread, but if you are trying to find out the 
basic type (int, float, list etc), you can use the same_type method.

eg.

dtml-let r=2.0
  dtml-if _.same_type(r, 1.0)
found float
  /dtml-if
/dtml-let

same_type will return TRUE if the two parameters are the same type. You can 
use this to test for float, int, list, etc.


hth

Jonathan



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How to get the type of an object by dtml

2006-11-29 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 29. November 2006 23:25:35 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 I want to do different operation to different object groups that I
 created my adding new products. But before I could do that I need to
 determine what the object I'm working with.

 Could anyone help me.. how do I use DTML to return the type of the object
 I'm currently working with?


obj.meta_type is usually the thing you're interested in.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFboe5CJIWIbr9KYwRApHYAJ0XGIaBuV9wzolUQis+16OOX8tLsgCdFlIY
r1gJyeOsROwiVTuDcVVvw+k=
=qT6N
-END PGP SIGNATURE-

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )