@Soap-dodger - I always have to hack templates by trial and error, so I won't try to answer your questions but I would have tried to use a Program Mode template. BTW the ifempty function will test for Undefined (null).
Hopefully one of the template experts, such as chaley, davidfor will chime in.
BR
|