Boy, that just flew right past me. Ridiculous. Thanks everyone.

On Jun 8, 1:06 pm, Dejan Noveski <[email protected]> wrote:
> http://docs.djangoproject.com/en/dev/ref/templates/builtins/#for
>
> scroll a bit down to see the forloop object and its properties.
>
>
>
> On Tue, Jun 8, 2010 at 8:05 PM, Dejan Noveski <[email protected]> wrote:
> > change {% if is_first_item %} with {% if forloop.first %} and you are set.
>
> > On Tue, Jun 8, 2010 at 7:59 PM, Nick <[email protected]> wrote:
>
> >> I am looking for a way to identify the first item returned in a loop
> >> and display it differently than the others:
>
> >> basically it would go like:
>
> >> {% for item in items %}
> >>    {% if is_first_item %}
> >>     This is what will show
> >>    {% else %}
> >>    this is what will show
> >> {% endfor %}
>
> >> Am I overlooking something in the docs?
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Django users" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to
> >> [email protected]<django-users%[email protected]>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/django-users?hl=en.
>
> > --
> > --
> > Dejan Noveski
> > Web Developer
> > [email protected]
> > Twitter:http://twitter.com/dekomote| LinkedIn:
> >http://mk.linkedin.com/in/dejannoveski
>
> --
> --
> Dejan Noveski
> Web Developer
> [email protected]
> Twitter:http://twitter.com/dekomote| 
> LinkedIn:http://mk.linkedin.com/in/dejannoveski

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to