[Zope] Concatenation

Ben Ocean zope@thewebsons.com
Sat, 10 Nov 2001 17:32:23 -0800


At 02:44 AM 11/11/01 +0500, you wrote:
>Ben Ocean wrote:
> >
> > Hi;
> > I'm trying to concatenate a <dtml-var> with a string. I have this poor 
> attempt:
> >    <dtml-var expr="_.string(title_or_id.'_frame')(_,_.None)">
> > where *title_or_id* is (of course) the <dtml-var> and *_frame* is the
> > string. How should I do this?
>
>you could try
>
><dtml-var title_or_id>_frame

This won't do because I forgot to mention I need to concatenate this and 
call it as a <dtml-var> (apologies to Andreas Jung).

><dtml-var "_.string(title_or_id)+'_frame'">

This threw the following error:

Error Type: TypeError
Error Value: object is not callable:

File 
/apache/ZopeInstallation/Zope_software_home/lib/python/DocumentTemplate/DT_Util.py, 
line 231, in eval
(Object: _.string(title_or_id)+'_frame')
(Info: title_or_id)
File <string>, line 2, in f
(Object: guarded_getattr)
TypeError: (see above)

Suggestions?
TIA,
BenO