Thanks,
jeffa. I'm using TT2, but I could easily adapt your second solution, if it turned out to be the best solution in this case. (I normally don't like to put that much logic/code in my templates, but that doesn't mean it might not be useful in some instances.)
Impossible Robot