If the docs are to be believed, {% ifequal %} does provide an option for an {% else %} clause. See http://docs.djangoproject.com/en/dev/ref/templates/builtins/#ifequal
That said, I can't tell from the code above why it would not work. But if you are using Django dev version (post 1.1) then go for the built- in smarter {% if %} tag, like so: - {% for group in user.groups.all %} {{ group.name }} {% if group.name == "subscribed" %} <h1>I'm subscribed</h1> {% else %} {{ group.name }} {% endif %} {% endfor %} GBS. On Jan 11, 1:09 pm, andreas schmid <a.schmi...@gmail.com> wrote: > i think ifequal does not accept an else in the statement. > > Dave Merwin wrote: > > I have the following: > > > {% for group in user.groups.all %} > > {{ group.name }} > > {% ifequal group.name "subscribed" %} > > <h1>I'm subscribed</h1> > > {% else %} > > {{ group.name }} > > {% endifequal %} > > {% endfor %} > > > The else part of the statement is not rendering. What am I missing? > > Any help welcome. > > > Thanks, > > Dave
-- 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.