This may not help you a lot but here is how I handled
alternate row coloring:
In my CSS file I defined the coloring
tr.normal { background-color:#14285F; }
tr.alternate { background-color: #293F78; }
In my web page, I did this:
<?php
$trclass = ($row_count % 2) ? "normal" : "alternate";
?>
...a bunch of other code and HTML lines...
<tr valign="top" class="<?php echo $trclass;
?>">
As for the "spry:if" business, I just used it a minute ago in
another page.
What my code is doing is displaying a gallery of my web work.
One of my data fields, "{siteURL}", can contain either a comment
(my comments are bracketed with the '[' and ']' characters) or an
actual URL.
If the "{siteURL}" field contains a comment, I merely display
the comment.
If the "{siteURL}" field contains a URL then I display the
URL as a clickable link to the actual web page. I did this because
it would make no sense to be able to click on a 'comment' and
therefore pull up an Error 404 page!!!
To test my code, I used a "spry:if" statement and it worked
fine - no problems.
For the real life situation, I actually needed an 'if...else'
construct so I had to swap my "spry:if" statement for a
"spry:choose" statement (there is no such thing as a "spry:else"
statement).
Perhaps you can look at my code and figure out from it, what
you might need to do with your code - honest, "spry:if" DOES work!:
<div style="display:inline; font-size:10px;
color:#555555" spry:detailregion="dsGalleries">
<div style="display:inline;"
spry:choose="spry:choose">
<div style="display:inline;"
spry:when="'{siteURL}'.search(/\[/) !=
-1;">{siteURL}</div>
<div style="display:inline;"
spry:default="spry:default"><a href='{siteURL}'
target='_blank'>{siteURL}</a></div>
</div>
<br /><br />
</div>
I hope all this might lead you in the right direction... good
luck!