unify phantom-template and server-template in a single transformer-template