[Zope-dev] Repeating a piece of HTML code
Shane Hathaway
shathaway@earthling.net
Fri, 02 Jun 2000 08:24:38 -0600
Alex Mendez wrote:
>
> 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?
<dtml-in expr="_.range(0, movie_rating)">
<img SRC="star.gif" height=15 width=15>
</dtml-in>
Replace movie_rating with the variable that represents the movie rating.
Shane