Re: [SMARTY] The infamous loop problem
| From: | Garland Foster | Date: | Fri, 22 Nov 2002 14:52:01 +0000 |
| Subject: | Re: [SMARTY] The infamous loop problem | ||
| References: | 1 2 3 4 5 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6515@lists.php.net to get a copy of this message | ||
Does this really work?
Adding the missing "name" parameter
I can't get the section to do the loop
----- Original Message -----
From: "Monte Ohrt" <monte@ispi.net>
To: "Garland Foster" <garland_foster@salutia.com>
Cc: <smarty-general@lists.php.net>
Sent: Friday, November 22, 2002 11:30 AM
Subject: Re: [SMARTY] The infamous loop problem
> {section loop=$rating}
> <img src="star.gif">
> {/section}
>
> On Fri, 2002-11-22 at 08:18, Garland Foster wrote:
> > Hello All,
> >
> > Please let me know the best approach to this simple problem:
> >
> > I have "rated" articles in my system and I want to display "n" stars
> > depending on the rating. For example if rating=5 I want to display 5
stars.
> > The stars are simple images star.gif
> > How can I do this, assuming I have $rating as a template variable?
> > Is there a way to loop from 1 to $rating ?
> >
> > Thanks a lot.
> > Garland
> >
> --
> Monte Ohrt <monte@ispi.net>
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>