simplify dialog HTML with template macros