> {% for item in items %} > <div class="{% cycle left,right %}> > Some text here > </div> > {% endfor %} > > Then a left and right class in your CSS to do the aligning.
I've got a question related to this: I'm using the cycle tag as above ('odd' and 'even', in my case) on a blog-like page, where several blog posts and their comments are output on one page. The comments sections are output by a single template piece that is included in the larger page, and that included template contains the cycle tag. I'm finding that the cycle holds over from one instance of the include to the next - I'd like the first comment for each post to be 'odd', instead the sequence is consistent all down the page, continuing from one post to the next. I assume that including the template multiple times means that that's essentially only one instance of the cycle tag -- is there anything I can change so that it will restart the cycle for each include? Thanks, Eric --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---