[Zope] Odd behaviour while searching in the namepsace
Evan Simpson
evan@digicool.com
Fri, 11 Feb 2000 22:09:51 -0600
----- Original Message -----
From: H.G.J. van der Linde <linde@fsw.leidenuniv.nl>
> I found out that using mwid with
>
> <dtml-if "_.has_key(mwid)">
> <dtml-var "_[mwid].tag()">
>
>
> one space is added to mwid, so I get 'linde '. This space is not in the
> database, or generated by the database, I guess, because this works fine:
>
> <img src="/psychologie/mwfoto/<dtml-var mwid>" align="right">
Not conclusive. The browser might be perfectly happy to strip off the
trailing space. Try <dtml-var expr="_.len(mwid)"> to see for sure.
> How do I use the (r)strip function in an expression like <dtml-if
> "_.has_key(mwid)">.
You can <dtml-if expr="_.has_key(string.strip(mwid))"> and <dtml-var
expr="_[string.strip(mwid)].tag()">
Cheers,
Evan @ digicool