Wrap tile output with template