Boy, that just flew right past me. Ridiculous. Thanks everyone. On Jun 8, 1:06 pm, Dejan Noveski <dr.m...@gmail.com> 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 <dr.m...@gmail.com> wrote: > > change {% if is_first_item %} with {% if forloop.first %} and you are set. > > > On Tue, Jun 8, 2010 at 7:59 PM, Nick <nickt...@gmail.com> 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 django-us...@googlegroups.com. > >> To unsubscribe from this group, send email to > >> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > >> . > >> For more options, visit this group at > >>http://groups.google.com/group/django-users?hl=en. > > > -- > > -- > > Dejan Noveski > > Web Developer > > dr.m...@gmail.com > > Twitter:http://twitter.com/dekomote| LinkedIn: > >http://mk.linkedin.com/in/dejannoveski > > -- > -- > Dejan Noveski > Web Developer > dr.m...@gmail.com > 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 django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.