fix template to work when using html or dirhtml output