[Zope] concatenate string and number
Alexis Roda
arv at si.urv.es
Wed Oct 15 10:25:19 EDT 2003
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)
--------------------------------------------------------------------
More information about the Zope
mailing list