Gary,
The templates are using standard ERB, which essentially gives you the ability to do arbitrary conditional logic using ruby.
Anything between <% %> is logic code and <%= %> is evaluated and printed.
<% if condition %>
<%= print_this %>
<% else %>
default
<% end %>
Play with ERB, it is very flexible.