List Items with alternating colours
<p>I have my template file which has data being populated into it. However I want to be able to write a class to every odd list element.</p>

<p>The issue i have is that some of the fields being listed are hidden when there is no data and as such i cannot simply write in the class of every other element.</p>

<p>I know I could do this using javascript, but would prefer not to.</p>

<p>Is there any way I can use the page_prerender to look at which list items are going to be displayed and add a class to each odd element?</p>

<p>for example my template looks like this but with many more fields:</p>

<pre><code>    &lt;ul&gt;
    &lt;li&gt;
    &lt;h3&gt;Data title&lt;/h3&gt;
    &lt;p&gt;&lt;%=GetDymanicData1 %&gt;&lt;/p&gt;
    &lt;/li&gt;
&lt;!-- if statement to check if data has value, else do not show --&gt;
    &lt;li&gt;
    &lt;h3&gt;Data title&lt;/h3&gt;
    &lt;p&gt;&lt;%=GetDymanicData2 %&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;h3&gt;Data title&lt;/h3&gt;
    &lt;p&gt;&lt;%=GetDymanicData2 %&gt;&lt;/p&gt;
    &lt;/li&gt;
    ...
    &lt;/ul&gt;
</code></pre>
