[Zope] remove square brackets in dtml-var

vsbabu@vsbabu.org vsbabu@vsbabu.org
Fri, 31 May 2002 05:51:52 -0500


On Thu, May 30, 2002 at 09:33:06PM -0500, Joshua Newman wrote:
> 
> My <dtml-var mail_group> renders as:  
> [mail1@here.com, mail2@there.com]
> 
> I am trying to use dtml-var to insert multiple email addresses into a
> sendmail form but when I use:
> 
> to: <dtml-var mail_group>

This is because mail_group is a list - or array. You can join the list like
    to: <dtml-var "_.string.join(mail_group,',')">

This will join the elements in the list using comma as a delimiter to get the
string "mail1@here.com,mail2@here.com".

HTH
Satheesh Babu
http://vsbabu.org/