[Zope-dev] Repeating a piece of HTML code

Jim Sanford jsanford@atinucleus.com
Fri, 2 Jun 2000 08:04:14 -0500


if  number_of_stars is 5 then

<dtml-var " '*' * number_of_stars ">

will give you *****

(Multiplication works on strings in python and thus Zope!)

Jim Sanford

----- Original Message ----- 
From: "Alex Mendez" <txapulin@yahoo.com>
To: "Lista Zope" <zope-dev@zope.org>
Sent: Friday, June 02, 2000 5:28 AM
Subject: [Zope-dev] Repeating a piece of HTML code


Hello, it's the first time I write here and I'm a
newbie at Zope, so maybe I'm asking a stupid
question...

Case is I retrieve from my movie database the value of
the movie from 1 to 5 stars. I would like to repeat
that n times the code <img SRC="star.gif" height=15
width=15> so the number of stars would appear:

1 - *
2 - **
3 - ***
4 - ****
5 - *****

Is there any way to do so in Zope? Does the <dtml-in>
tag anything to do with it?

Thank you!

=====
Saludos!!                               --------
                                 _-    /Txapulin\    -_
txapulin@yahoo.com              O  \  /   ---    \  /  O
http://www.geocities.com/txapulin   \/     |      \/
                                    /      |XAP    \
                             |----------------------------|
                             |----------------------------|

__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )