Re: Template - counter for if loop

2011-06-02 Thread Tim Shaffer
I think you might want the heading outside the loop: My Heading {% for val in data %} {% ifnotequal val 2 %} {{val}} {% endifnotequal %} {% endfor %} -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discus

Template - counter for if loop

2011-06-02 Thread jai_python
I need to show the heading only one time when forloop executed along with if-loop; example: - data.html -- {% for val in data %} {% ifnotequal val 2 %} My Heading {{val}} {% endifnotequal %} {% endfor %} Input data=[1,2,3,4,5,2,6] Ex