Pipe kind through
Show template depending on kind
Make document template proper