concatenate string and number
Please, help me! How can I concatenate string and number in Zope in DTML method? For example, 'id' and sequence-number when 'id' is string. I have tried to use + and &, but it doesn't work. Does anyone have advice for me? porky ------------------------------------------------------------------------------- http://www.one.lv - Tavs mobilais e-pasts! Tagad lasi savu e-pastu ar mobilo telefonu - wap.one.lv!
Hi Here is an example: <dtml-var "id + _.str(_['sequence-number'])"> dragos ----- Original Message ----- From: "Kariina Neimane" <porky@one.lv> To: <zope@zope.org> Sent: Wednesday, October 15, 2003 4:03 PM Subject: [Zope] concatenate string and number
Please, help me!
How can I concatenate string and number in Zope in DTML method? For example, 'id' and sequence-number when 'id' is string. I have tried to use + and &, but it doesn't work.
Does anyone have advice for me?
porky
--------------------------------------------------------------------------
http://www.one.lv - Tavs mobilais e-pasts!
Tagad lasi savu e-pastu ar mobilo telefonu - wap.one.lv!
_______________________________________________ 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 )
Kariina Neimane wrote:
Please, help me!
How can I concatenate string and number in Zope in DTML method? For example, 'id' and sequence-number when 'id' is string. I have tried to use + and &, but it doesn't work.
Does anyone have advice for me?
Not exactly concatenation, but very powerful: <dtml-let result = "'%i some text' % integer_value"> do something with result </dtml-let> to concatenate an integer with a string you should convert the integer value to string, _.str(value), and then use the + operator. HTH -- //// (@ @) ---------------------------oOO----(_)----OOo------------------------ Los pecados de los tres mundos desapareceran conmigo. Alexis Roda - Universitat Rovira i Virgili - Reus, Tarragona (Spain) --------------------------------------------------------------------
participants (3)
-
Alexis Roda -
Dragos Chirila -
Kariina Neimane