I'm creating a site which has a series of boolean fields to control what icons are displayed on a page.. in total there will be around 20 fields for this particular section.
In my template I have something like this:
<% if Field1 %>
<img src="$ThemeDir/images/icon/Field1.jpg" title="SField1" alt="$Field1" width="32" height="32"/>
<% end_if %>
<% if Field2 %>
<img src="$ThemeDir/images/icon/Field2.jpg" title="SField2" alt="$Field2" width="32" height="32"/>
<% end_if %>
<% if Field3 %>
<img src="$ThemeDir/images/icon/Field3.jpg" title="SField3" alt="$Field3" width="32" height="32"/>
<% end_if %>
<% if Field4 %>
<img src="$ThemeDir/images/icon/Field4.jpg" title="SField4" alt="$Field4" width="32" height="32"/>
<% end_if %>
Can that be re-rwriiten to something shorter?