<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Django&#8217;s template syntax, enhanced ifchanged</title>
	<atom:link href="http://wolfram.kriesing.de/blog/index.php/2006/djangos-template-syntax-enhanced-ifchanged/feed" rel="self" type="application/rss+xml" />
	<link>http://wolfram.kriesing.de/blog/index.php/2006/djangos-template-syntax-enhanced-ifchanged</link>
	<description>all the other blogs have such cool names, I don't know one ...</description>
	<pubDate>Thu, 09 Feb 2012 17:35:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Johnie</title>
		<link>http://wolfram.kriesing.de/blog/index.php/2006/djangos-template-syntax-enhanced-ifchanged/comment-page-1#comment-440999</link>
		<dc:creator>Johnie</dc:creator>
		<pubDate>Wed, 19 Oct 2011 04:55:53 +0000</pubDate>
		<guid isPermaLink="false">http://wolfram.kriesing.de/blog/index.php/2006/djangos-template-syntax-enhanced-ifchanged#comment-440999</guid>
		<description>Solche Artikel mag ich!</description>
		<content:encoded><![CDATA[<p>Solche Artikel mag ich!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ksamuel</title>
		<link>http://wolfram.kriesing.de/blog/index.php/2006/djangos-template-syntax-enhanced-ifchanged/comment-page-1#comment-437097</link>
		<dc:creator>ksamuel</dc:creator>
		<pubDate>Sat, 17 Sep 2011 19:34:41 +0000</pubDate>
		<guid isPermaLink="false">http://wolfram.kriesing.de/blog/index.php/2006/djangos-template-syntax-enhanced-ifchanged#comment-437097</guid>
		<description>What you would do using modulus, you can do with the template filter "divisibleby":

	{% if forloop.counter&#124;divisibleby:"3" %} 
		do stuff
	{% endif %}

If the equivalent of 

	{% if forloop.counter % 3 == 0 %} 
		do stuff
	{% endif %}</description>
		<content:encoded><![CDATA[<p>What you would do using modulus, you can do with the template filter &#8220;divisibleby&#8221;:</p>
<p>	{% if forloop.counter|divisibleby:&#8221;3&#8243; %}<br />
		do stuff<br />
	{% endif %}</p>
<p>If the equivalent of </p>
<p>	{% if forloop.counter % 3 == 0 %}<br />
		do stuff<br />
	{% endif %}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: monokrome</title>
		<link>http://wolfram.kriesing.de/blog/index.php/2006/djangos-template-syntax-enhanced-ifchanged/comment-page-1#comment-407559</link>
		<dc:creator>monokrome</dc:creator>
		<pubDate>Wed, 20 Jan 2010 18:05:35 +0000</pubDate>
		<guid isPermaLink="false">http://wolfram.kriesing.de/blog/index.php/2006/djangos-template-syntax-enhanced-ifchanged#comment-407559</guid>
		<description>My last comment would have looked a lot more interesting if the HTML was properly changed. The template tag you put in your class is:

{% cycle "odd" "even" %}

This will give you an odd and an even class throughout the loop on the cycled items.</description>
		<content:encoded><![CDATA[<p>My last comment would have looked a lot more interesting if the HTML was properly changed. The template tag you put in your class is:</p>
<p>{% cycle &#8220;odd&#8221; &#8220;even&#8221; %}</p>
<p>This will give you an odd and an even class throughout the loop on the cycled items.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: monokrome</title>
		<link>http://wolfram.kriesing.de/blog/index.php/2006/djangos-template-syntax-enhanced-ifchanged/comment-page-1#comment-407558</link>
		<dc:creator>monokrome</dc:creator>
		<pubDate>Wed, 20 Jan 2010 18:03:44 +0000</pubDate>
		<guid isPermaLink="false">http://wolfram.kriesing.de/blog/index.php/2006/djangos-template-syntax-enhanced-ifchanged#comment-407558</guid>
		<description>This is the standard format for alternating rows in dJango:


{% for item in item_list %}
  {{ item }}
{% endfor %}
</description>
		<content:encoded><![CDATA[<p>This is the standard format for alternating rows in dJango:</p>
<p>{% for item in item_list %}<br />
  {{ item }}<br />
{% endfor %}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thiago</title>
		<link>http://wolfram.kriesing.de/blog/index.php/2006/djangos-template-syntax-enhanced-ifchanged/comment-page-1#comment-343820</link>
		<dc:creator>Thiago</dc:creator>
		<pubDate>Fri, 19 Dec 2008 15:47:54 +0000</pubDate>
		<guid isPermaLink="false">http://wolfram.kriesing.de/blog/index.php/2006/djangos-template-syntax-enhanced-ifchanged#comment-343820</guid>
		<description>i have the same problem and found this:

Variable 	                 Description
forloop.counter 	         The current iteration of the loop (1-indexed)
forloop.counter0  	 The current iteration of the loop (0-indexed)
forloop.revcounter 	 The number of iterations from the end of the loop (1-indexed)
forloop.revcounter0 	 The number of iterations from the end of the loop (0-indexed)
forloop.first 	          True if this is the first time through the loop
forloop.last 	          True if this is the last time through the loop
forloop.parentloop 	  For nested loops, this is the loop "above" the current one

I hope it works for you.</description>
		<content:encoded><![CDATA[<p>i have the same problem and found this:</p>
<p>Variable 	                 Description<br />
forloop.counter 	         The current iteration of the loop (1-indexed)<br />
forloop.counter0  	 The current iteration of the loop (0-indexed)<br />
forloop.revcounter 	 The number of iterations from the end of the loop (1-indexed)<br />
forloop.revcounter0 	 The number of iterations from the end of the loop (0-indexed)<br />
forloop.first 	          True if this is the first time through the loop<br />
forloop.last 	          True if this is the last time through the loop<br />
forloop.parentloop 	  For nested loops, this is the loop &#8220;above&#8221; the current one</p>
<p>I hope it works for you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

