[Zope] string crisis....

Arnaud Lecat lecat@hexanet.fr
Wed, 08 Sep 1999 16:38:05 +0200


id is ok for me... it contains the good string

A simple display test for
*<dtml-var mydocid>*<dtml-var id>*

gives me
*design*design*

And <dtml-if "mydocid==id">blah blah</dtml-if> is not true !!! What's
happening ?

(* is for a purpose of display to see if there were some unwanted char in
front or behind the string)

Martijn Pieters wrote:

> At 16:04 08/09/99 , Arnaud Lecat wrote:
> >Hi
> >
> >How come that a simple test <dtml-if "mydocid==id">blah blah</dtml-if>
> >isn't true
> >whereas the values seem to be the same (mydocid and id seems to contain
> >the same
> >string)....
> >
> >Twiglight zone ?
>
> Sometimes id is a method, not a string. Try mydocid==_['id'].
>
> The _['id'] does a namespace lookup, which includes a call to id if id is a
> method. This way it'll work wether or not id is a string.
>
> --
> Martijn Pieters, Web Developer
> | Antraciet http://www.antraciet.nl
> | Tel: +31-35-7502100 Fax: +31-35-7502111
> | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
> | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
> ------------------------------------------

--
       >> WinErr: 080 Clavier introuvable - Veuillez appuyer
          sur n'importe quelle touche pour continuer. <<


Arnaud LECAT >> Email: lecat@hexanet.fr >> WWW page:www.hexanet.fr/~lecat

                    HEXANET >> http://www.hexanet.fr

                Z.A. Farman sud - 9 rue Roland Coffignot
                 BP 415 - 51689 Reims Cedex 2 - France
     phone: (33) 03 26 79 30 05             Fax: (33) 03 26 79 30 06