Tom M:
{{ #if: {{{district|}}} |
! District: | {{{district|}}}
}}
That says:
if {{{district}}} is not empty then
output "! District:"
else
output "{{{district}}}"
The problem is that the vertical bar which you're using as a table field
separator is seen by the #if as a parameter separator.
Try this:
{{ #if: {{{district|}}} |
! District: {{!}}{{!}} {{{district|}}}
}}
You need to first define Template:!, which consists of the vertical bar
character. See for example "Template:Infobox actor" on WP:
http://en.wikipedia.org/w/index.php?title=Template:Infobox_actor&action=
edit
Ian