Topic: Better way to write conditional formatting
This code works fine, but is distracting me as I'm sure there must be a cleaner way to write it (it reminds me too much of asp!). Any ideas?
<td><% if listing.count == 0 then %>0<% else %><strong><%= listing.count %></strong><% end %></td>
Also does it make sense to html encode strings before storing them in the database? Surely this would save processing later?
Last edited by aubergene (2006-11-30 16:33:19)